Scaling Laws for Code: A More Data-Hungry Regime
Not on the map. Why?
Abstract (arXiv)
Code Large Language Models (LLMs) are revolutionizing software engineering. However, scaling laws that guide the efficient training are predominantly analyzed on Natural Language (NL). Given the fundamental differences like strict syntax between code and NL, it is unclear whether these laws are directly applicable to code. To address this gap, we conduct the first large-scale empirical study of scaling laws for code, comprising 117 experimental runs with model sizes from 0.2B to 3.8B and training tokens from 2B to 128B. We fit the Chinchilla law and the Farsser law. First, the results show that the more expressive Farseer law offers greater accuracy. Second, the analysis reveals that Code LLMs scale effectively with model size. Crucially, code represents a more data-hungry regime, requiring a substantially higher data-to-parameter ratio than NL. Finally, two additional sets of experiments on code-NL mixtures show that NL benefits resource-constrained scenarios, but becomes a detriment at higher compute budgets.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 27 of its 37 references that are in the map. First posted on arXiv 9 Oct 2025.
Builds on
27 of 37 references.
References · 27
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2020GLU Variants Improve Transformercited by 1,724
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
- 2024RegMix: Data Mixture as Regression for Language Model Pre-trainingcited by 172
15 more
- 2023Beyond Chinchilla-Optimal: Accounting for Inference in Language Model Scaling Lawscited by 155
- 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 116
- 2024Can Language Models Solve Olympiad Programming?cited by 70
- 2025A Survey on (M)LLM-Based GUI Agentscited by 61
- 2025Scaling Laws of Synthetic Data for Language Modelscited by 44
- 2025Towards Greater Leverage: Scaling Laws for Efficient Mixture-of-Experts Language Modelscited by 44
- 2025Predictable Scale: Part I, Step Law -- Optimal Hyperparameter Scaling Law in Large Language Model Pretrainingcited by 30
- 2024Unraveling the Mystery of Scaling Laws: Part Icited by 24
- 2024Scaling Law for Language Models Training Considering Batch Sizecited by 19
- 2018Studying the Difference Between Natural and Programming Language Corporacited by 13
- 2025Compute Optimal Scaling of Skills: Knowledge vs Reasoningcited by 11
- 2025Towards a Comprehensive Scaling Law of Mixture-of-Expertscited by 9
- 2025Assessing Small Language Models for Code Generation: An Empirical Study with Benchmarkscited by 8
- 2024Scaling Laws Behind Code Understanding Modelcited by 4
- 2025Is Compression Really Linear with Code Intelligence?cited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.