{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/resolving-discrepancies-in-compute-optimal","title":"Resolving Discrepancies in Compute-Optimal Scaling of Language Models","arxiv_id":"2406.19146","date":"2024-06-27","proceeding":null,"authors":["Tomer Porian","Mitchell Wortsman","Jenia Jitsev","Ludwig Schmidt","Yair Carmon"],"abstract":"Kaplan et al. and Hoffmann et al. developed influential scaling laws for the optimal model size as a function of the compute budget, but these laws yield substantially different predictions. We explain the discrepancy by reproducing the Kaplan scaling law on two datasets (OpenWebText2 and RefinedWeb) and identifying three factors causing the difference: last layer computational cost, warmup duration, and scale-dependent optimizer tuning. With these factors corrected, we obtain excellent agreement with the Hoffmann et al. (i.e., \"Chinchilla\") scaling law. Counter to a hypothesis of Hoffmann et al., we find that careful learning rate decay is not essential for the validity of their scaling law. As a secondary result, we derive scaling laws for the optimal learning rate and batch size, finding that tuning the AdamW $\\beta_2$ parameter is essential at lower batch sizes.","url_abs":"https://arxiv.org/abs/2406.19146v4","url_pdf":"https://arxiv.org/pdf/2406.19146v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"resolving-discrepancies-in-compute-optimal","repo_url":"https://github.com/formll/resolving-scaling-law-discrepancies","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"resolving-discrepancies-in-compute-optimal","repo_url":"https://github.com/formll/resolving-scaling-law-discrepencies","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"resolving-discrepancies-in-compute-optimal","repo_url":"https://github.com/hadasah/scaling_laws","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"adamw","method_name":"AdamW"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.19146","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.19146"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hadasah/scaling_laws","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/formll/resolving-scaling-law-discrepancies","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/formll/resolving-scaling-law-discrepencies","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"ran_violates":3,"ran_honours":2,"ran_draft_wrong":1,"ran_fixture":1,"unverified":6},"by_repo_kind":{"official":{"samples":15,"ran":9,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"6a004a1784aa8d01","entry":"add_zero","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"paper_tables.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/paper_tables.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a004a1784aa8d01"}},{"code_sha256_prefix":"752782550c94c617","entry":"custom_huber_loss","repo":"formll/resolving-scaling-law-discrepancies","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepancies/blob/HEAD/analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"752782550c94c617"}},{"code_sha256_prefix":"15bb4fddf111e4b7","entry":"fetch_flop","repo":"formll/resolving-scaling-law-discrepancies","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepancies/blob/HEAD/analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"15bb4fddf111e4b7"}},{"code_sha256_prefix":"8d1a5df6af7bf845","entry":"get_color","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"utils.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d1a5df6af7bf845"}},{"code_sha256_prefix":"99378ea8da320872","entry":"get_linestyle","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"utils.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"99378ea8da320872"}},{"code_sha256_prefix":"9bcb697d9afad429","entry":"get_marker","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"utils.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9bcb697d9afad429"}},{"code_sha256_prefix":"cd1ae572668e4ce4","entry":"huber_loss_objective","repo":"formll/resolving-scaling-law-discrepancies","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepancies/blob/HEAD/analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cd1ae572668e4ce4"}},{"code_sha256_prefix":"a6d9e09c75556988","entry":"maybe_get_item","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"a6d9e09c75556988"}},{"code_sha256_prefix":"fc9bc7439b7fd07b","entry":"precise_flops_per_token_chinchilla","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"data.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/data.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fc9bc7439b7fd07b"}},{"code_sha256_prefix":"e20ba47c892c9025","entry":"precise_param_count_open_lm","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"data.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/data.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e20ba47c892c9025"}},{"code_sha256_prefix":"4fa5926c92763b45","entry":"draw_fit","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"plotting.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/plotting.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4fa5926c92763b45"}},{"code_sha256_prefix":"4c878b8671db62ea","entry":"extract_CI","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"paper_tables.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/paper_tables.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4c878b8671db62ea"}},{"code_sha256_prefix":"9370894d3db38de0","entry":"extract_label","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"paper_tables.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/paper_tables.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9370894d3db38de0"}},{"code_sha256_prefix":"51aa561ef23bceaa","entry":"isoflop_curves_plot","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"plotting.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/plotting.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"51aa561ef23bceaa"}},{"code_sha256_prefix":"3ae2bda49e8d6539","entry":"opt_param_vs_compute_plot","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"plotting.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/plotting.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3ae2bda49e8d6539"}},{"code_sha256_prefix":"b8859ce442ad4d05","entry":"proportional_sliding_window_filter","repo":"formll/resolving-scaling-law-discrepencies","repo_kind":"official","path":"data.py","file_url":"https://github.com/formll/resolving-scaling-law-discrepencies/blob/HEAD/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8859ce442ad4d05"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}