- Explain power-law scaling and read exponents from a log-log plot.
- Compare the Kaplan (2020) and Chinchilla (2022) conclusions and the methodological reason they differ.
- Derive compute-optimal model size and token count from C ≈ 6ND and a tokens-per-parameter ratio.
- Evaluate the parametric loss L(N, D) = E + A/N^α + B/D^β for concrete models.
- Justify over-training small models when inference demand is high.
- Assess the emergent-abilities debate and the role of test-time compute and data constraints.
Before this: Pretraining and Data: How a Base Model Is Made, Optimization for Machine Learning
Scaling laws are the closest thing large-model training has to engineering equations. They let a lab spend a small fraction of its budget on small models and then predict, before committing tens of millions of dollars, how good a large model will be and how to split compute between parameters and data. They also explain several industry patterns you will see constantly: why small open models are trained on far more data than the "optimal" amount, why labs now talk about scaling inference compute, and why high-quality data is becoming the binding constraint.
Intuition: three knobs and a smooth curve
Training a language model has three main resources: the number of parameters , the number of training tokens , and the compute you can spend, which is tied to the other two by . Picture the test loss as a landscape over these knobs. The surprising empirical finding is that the landscape is smooth and regular: across many orders of magnitude, loss falls as a power law in each resource, which on log-log axes is a straight line. A straight line can be extrapolated. That is the whole trick: fit lines on cheap experiments, extend them to expensive ones.
A useful analogy is a student preparing for an exam with a fixed number of hours. Studying from a tiny notebook (few parameters) caps what can be remembered no matter how long you study. Owning a vast notebook but only skimming one chapter (too little data) wastes the notebook. The best result for a fixed number of hours balances notebook size and material covered. Scaling laws quantify that balance.
Power laws, formally
A power law has the form with exponent . Taking logs gives , a straight line with slope . A key property: multiplying by a constant factor always multiplies by , regardless of where you start. So "10x more compute reduces reducible loss by a fixed fraction" is the signature of power-law scaling.
Kaplan et al. (2020)
Kaplan and colleagues at OpenAI trained many transformer language models and reported that, when the other factors are not a bottleneck, loss follows
with counting non-embedding parameters, tokens, and the compute used when training efficiently. Their fitted exponents were small: , , . The constants , , depend on the tokenizer and data and have no deep meaning by themselves. They also proposed a joint form,
and concluded that, for a growing compute budget, model size should grow quickly, roughly , with data growing more slowly. Other findings held up well: architecture details such as depth versus width matter much less than total parameter count within a broad range, and larger models are more sample-efficient. This paper shaped the 2020 to 2021 era of very large models trained on comparatively few tokens; GPT-3, for example, had 175B parameters trained on about 300B tokens.
Chinchilla: Hoffmann et al. (2022)
DeepMind revisited the question by training over 400 models from 70 million to over 16 billion parameters on 5 to 500 billion tokens. A key methodological difference is that they adjusted the learning-rate schedule to match each run's length; Kaplan's runs used a fixed schedule length, which made shorter training look worse than it is and biased the conclusions toward larger models. Using three separate methods (envelopes of training curves, IsoFLOP profiles, and a parametric fit), they found the compute-optimal model size and data both scale as roughly the square root of compute:
(their three approaches gave = 0.50, 0.49 and 0.46). The parametric approach fits
with , , , , . Each term has a clean interpretation: is the irreducible loss (the entropy of natural text under this tokenizer, which no model can beat), is the penalty for a finite model, and is the penalty for finite data.
The practical upshot is the widely quoted rule of thumb of about 20 training tokens per parameter for compute-optimal training. To test it, they trained Chinchilla: 70B parameters on 1.4 trillion tokens, using the same compute as their earlier Gopher model (280B parameters, 300B tokens). Chinchilla, four times smaller and trained on about four times more data, outperformed Gopher on most evaluations, and being smaller it was also cheaper to serve.
Worked example 1: compute-optimal allocation
Suppose you have FLOPs. Using and :
- Substitute: .
- Solve: , about 91B parameters.
- Data: , about 1.8T tokens.
- Check: . Correct.
Note the square-root behaviour: 100 times more compute gives 10 times more parameters and 10 times more tokens.
Worked example 2: comparing Gopher and Chinchilla with the fitted law
Plug the published sizes into the parametric fit.
Chinchilla, , :
- Model term: .
- Data term: .
- Predicted loss: .
Gopher, , :
- Model term: .
- Data term: .
- Predicted loss: .
Gopher's huge model term advantage is swamped by its data deficit. The fit predicts Chinchilla wins at roughly equal compute, which is what the evaluations showed. (Later work re-analysing the paper's data argued that the published parametric constants are imprecise; treat them as illustrative and refit on your own setup.)
import numpy as np
E, A, B, alpha, beta = 1.69, 406.4, 410.7, 0.34, 0.28
def loss(N, D):
return E + A / N**alpha + B / D**beta
def best_split(C, grid=400):
# Search model sizes on a log grid; tokens follow from C = 6 N D.
Ns = np.logspace(8, 13, grid)
Ds = C / (6 * Ns)
L = loss(Ns, Ds)
i = np.argmin(L)
return Ns[i], Ds[i], L[i]
for C in [1e21, 1e22, 1e23, 1e24, 1e25]:
N, D, L = best_split(C)
print(f"C={C:.0e} N*={N:.2e} D*={D:.2e} tokens/param={D/N:5.1f} loss={L:.3f}")
Run this and you will notice two things. First, the optimal tokens-per-parameter ratio drifts upward with compute (from about 49 at FLOPs to about 120 at ), because the fitted exponents differ: . Second, the published parametric constants imply considerably more tokens per parameter than the paper's other two methods, which is exactly the inconsistency that later replication work flagged. The 20:1 figure comes from the IsoFLOP-style analyses and is a convenient summary, not a constant of nature; refit on your own data before relying on any of it.
Over-training for inference efficiency
Chinchilla optimality minimises training compute for a target loss. Real deployments also pay for inference, every token for every user, often for years. A smaller model is cheaper and faster to serve and fits on smaller hardware. Since loss keeps falling (with diminishing returns) as you add data, it is often worth training a smaller model far past 20 tokens per parameter. Meta's Llama 3 8B, for instance, was trained on about 15 trillion tokens, nearly 1,900 tokens per parameter. Sardana and colleagues formalised this trade-off by adding expected inference demand to the cost function: the more tokens a model will serve over its lifetime, the smaller and longer-trained the optimal model becomes.
The cost of over-training is a training-compute premium. From the parametric fit, to reach a given loss with a smaller you must push much further, because the data term shrinks only as . Teams accept this because training is a one-time cost while inference is recurring.
Emergent abilities: a live debate
The case for emergence. Wei et al. (2022) defined an ability as emergent if it is absent in smaller models but present in larger ones, and documented dozens of tasks (multi-step arithmetic, some BIG-Bench tasks, chain-of-thought prompting benefits) where performance sat near chance until a scale threshold and then rose sharply. If true, emergence means capabilities cannot be forecast by extrapolating small-model trends, which matters for both planning and safety.
The case against. Schaeffer, Miranda and Koyejo (2023) argued that much apparent emergence is a property of the metric, not the model. Exact-match accuracy on a five-digit addition is all-or-nothing: if per-token accuracy improves smoothly from 0.5 to 0.9, the probability of getting all five digits right goes from to , which looks like a sudden jump. Re-scoring with continuous metrics such as token-level log-likelihood or edit distance often reveals smooth, predictable improvement. They also induced "emergence" in vision models simply by choosing discontinuous metrics. They did not claim emergence can never happen.
Where this leaves practitioners. Both observations are useful. Underlying loss improves smoothly, but the task metrics users care about are frequently thresholded, so usefulness can still appear abruptly. Forecast with continuous proxies, track many tasks, and do not assume a capability is absent just because small models fail at it.
Test-time compute scaling
Scaling laws originally concerned training. Since 2024 a second axis has become central: spending more compute at inference. Options include sampling many candidate answers and taking a majority vote (self-consistency), best-of- selection with a verifier or reward model, tree search, and training models to produce long chains of thought before answering (reasoning models). Snell et al. (2024) studied how to allocate inference compute optimally and found that, on problems of moderate difficulty, adaptively spending test-time compute can outperform a model many times larger, while for the hardest problems more pretraining is still more effective. Reasoning-model reports show accuracy rising roughly log-linearly with the number of thinking tokens on math and coding benchmarks. The practical consequence is a new budgeting question: for a given latency and cost target, is it better to call a larger model once or a smaller model with more thinking? The reasoning-models lesson covers the mechanics.
Data constraints
Chinchilla-style scaling assumes unlimited fresh data. High-quality public text is finite. Villalobos et al. estimated that, at historical growth rates, frontier training runs could exhaust the stock of public human-generated text within roughly the late 2020s, with wide uncertainty. Responses include:
- Repetition. Muennighoff et al. (2023) found that with limited unique data, training for up to about four epochs costs very little compared with fresh data, while many more repetitions bring rapidly diminishing returns. They proposed a data-constrained scaling law that discounts repeated tokens.
- Better filtering, which improves the value per token (see FineWeb-Edu in the pretraining lesson), effectively shifting the scaling curve.
- Synthetic data, generated and verified by models, especially for math and code where correctness can be checked automatically.
- New modalities (images, audio, video) and licensed proprietary data.
Common pitfalls
- Treating 20 tokens/parameter as a law. It depends on data quality, architecture and the fitting method, and is the wrong target if inference cost matters.
- Mixing parameter definitions. Kaplan excluded embedding parameters; Chinchilla counted all. Mixture-of-experts models need the active parameter count for compute and the total count for memory.
- Extrapolating from too narrow a range. Fit over at least two or three orders of magnitude of compute and check residuals.
- Using a fixed learning-rate schedule across run lengths, which biases fits (the Kaplan versus Chinchilla discrepancy).
- Forecasting thresholded metrics directly. Fit loss or log-likelihood, then map to task accuracy.
- Ignoring data repetition. Losses predicted for unique tokens will be optimistic once you start repeating data many times.
In practice
Labs run small "scaling ladders" (for example models from 50M to 2B parameters at several token counts) for every major change of architecture, data mixture or tokenizer, fit , and choose the final model size from the fitted curve plus an inference-cost model. Teams training small models for deployment deliberately over-train by one to two orders of magnitude beyond Chinchilla-optimal. When you choose a model to deploy, the scaling view suggests three questions: how many tokens was it trained on relative to its size, how much test-time compute does it use per answer, and is your task's metric smooth or thresholded? For hardware sizing of the models that result, see the site's AI Index methodology.
Key takeaways
- Loss falls as a power law in parameters, data and compute, so small-scale experiments can predict large-scale results.
- Chinchilla found parameters and tokens should scale roughly equally with compute, about 20 tokens per parameter, overturning Kaplan's model-heavy allocation.
- Because inference is a recurring cost, production models are often trained far beyond the compute-optimal token count.
- Apparent emergence is partly a metric artefact; forecast with continuous metrics but expect thresholded task metrics to jump.
- Test-time compute is a second scaling axis that can substitute for model size on many problems.
- High-quality data is finite; repetition up to a few epochs, better filtering and verified synthetic data stretch it.
Terms in this lesson
- Power law
- A relationship y = a·x^(−α) that appears as a straight line with slope −α on log-log axes.
- Compute-optimal
- The split of a fixed training-compute budget between model size and training tokens that minimises loss.
- Chinchilla ratio
- The rule of thumb that compute-optimal training uses roughly 20 tokens per model parameter.
- Irreducible loss
- The asymptotic loss term E that no model size or data amount can remove, reflecting the entropy of the text.
- IsoFLOP profile
- A curve of final loss versus model size for runs that all use the same compute budget, whose minimum gives the optimal size.
- Over-training
- Training a model on more tokens than compute-optimal in order to obtain a smaller, cheaper-to-serve model at a given quality.
- Emergent ability
- A capability absent in smaller models but present in larger ones, as defined by Wei et al. (2022).
- Test-time compute
- Computation spent during inference, such as longer reasoning, sampling multiple answers, or search, to improve output quality.
Check your understanding
- 1.
Under the Chinchilla rule (D = 20N) and C = 6ND, how many parameters should a 6 × 10^23 FLOP budget use?
- 2.
What was the main methodological reason Chinchilla's allocation differed from Kaplan et al.'s?
- 3.
A model's per-digit accuracy improves smoothly from 0.6 to 0.9 with scale. Its exact-match accuracy on 6-digit answers goes from about 0.05 to about 0.53. What does this illustrate?
- 4.
You will serve a model to millions of users for two years and care about latency. Which training choice is usually best?
- 5.
In L(N, D) = E + A/N^α + B/D^β, what does E represent?
Exercises
Work each problem before opening the solution.
- Exercise 1Core
Kaplan's model-size law has α_N ≈ 0.076. By what factor does the loss L(N) change if you multiply N by 10? By 100?
Show solution
L(N) ∝ N^(−0.076). Multiplying N by 10 multiplies L by 10^(−0.076) = e^(−0.076 × 2.3026) = e^(−0.175) ≈ 0.839, a 16% reduction. Multiplying by 100 multiplies L by 0.839² ≈ 0.704, about a 30% reduction. The same factor applies wherever you start, which is the defining property of a power law.
- Exercise 2Core
You have 2,000 H100 GPU-days at 40% MFU (peak 989 TFLOP/s). (a) What compute budget is that? (b) What is the Chinchilla-optimal model size and token count?
Show solution
(a) Seconds: 2,000 × 86,400 = 1.728e8 GPU-seconds. Effective throughput 0.40 × 989e12 = 3.956e14 FLOP/s. C = 1.728e8 × 3.956e14 ≈ 6.84e22 FLOPs.
(b) N = sqrt(C/120) = sqrt(5.70e20) ≈ 2.39e10, about 24B parameters. D = 20N ≈ 4.8e11, about 480B tokens. Check: 6 × 2.39e10 × 4.78e11 ≈ 6.85e22.
- Exercise 3Core
Using the Chinchilla parametric fit (E = 1.69, A = 406.4, B = 410.7, α = 0.34, β = 0.28), write Python that compares the predicted loss of (a) a 7B model trained on 140B tokens and (b) a 7B model trained on 2T tokens. How much compute does each use?
Show solution
E, A, B, a, b = 1.69, 406.4, 410.7, 0.34, 0.28 loss = lambda N, D: E + A / N**a + B / D**b for D in (140e9, 2e12): print(f"D={D:.1e} loss={loss(7e9, D):.3f} C={6*7e9*D:.2e}")Output: for 140B tokens, loss ≈ 2.184 (model term ≈ 0.183, data term ≈ 0.311) with C ≈ 5.9e21 FLOPs. For 2T tokens, loss ≈ 2.020 (data term falls to ≈ 0.148) with C ≈ 8.4e22 FLOPs. Training about 14 times longer buys a loss reduction of about 0.16 nats, with diminishing returns because the data term only falls as D^(−0.28); the fixed model term (0.183) increasingly dominates the reducible loss.
- Exercise 4Challenge
Show that, for the parametric law with C = 6ND, the compute-optimal model size scales as N_opt ∝ C^(β/(α+β)). Compute the exponent for α = 0.34, β = 0.28 and explain why the optimal tokens-per-parameter ratio slowly grows with compute.
Show solution
Substitute D = C/(6N): L(N) = E + A N^(−α) + B (C/6)^(−β) N^β. Set dL/dN = 0:
−α A N^(−α−1) + β B (C/6)^(−β) N^(β−1) = 0
⇒ α A N^(−α) = β B (C/6)^(−β) N^β ⇒ N^(α+β) = (α A / (β B)) (C/6)^β
⇒ N_opt = G (C/6)^(β/(α+β)) with G = (αA/(βB))^(1/(α+β)).
Exponent: 0.28 / 0.62 ≈ 0.452. Then D_opt = C/(6N_opt) ∝ C^(1−0.452) = C^0.548. The ratio D/N ∝ C^(0.548−0.452) = C^0.097, so each 10× increase in compute raises the optimal tokens-per-parameter ratio by 10^0.097 ≈ 1.25×. That is why the 20:1 ratio is only a summary of the range the paper studied (Approach 3 gives a = 0.46, consistent with this derivation).
Further reading
- paperKaplan et al., Scaling Laws for Neural Language Models (2020)
- paperHoffmann et al., Training Compute-Optimal Large Language Models (2022)
- paperWei et al., Emergent Abilities of Large Language Models (2022)
- paperSchaeffer, Miranda & Koyejo, Are Emergent Abilities of Large Language Models a Mirage? (2023)
- paperSnell et al., Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters (2024)
- paperMuennighoff et al., Scaling Data-Constrained Language Models (2023)
Go further
Sources
- Kaplan et al. (arXiv 2001.08361), fitted exponents and C ≈ 6NBS
- Hoffmann et al. (arXiv 2203.15556), fitted constants, model counts, Gopher and Chinchilla sizes
- Wei et al., Emergent Abilities of Large Language Models (arXiv 2206.07682)
- Schaeffer et al., Are Emergent Abilities of Large Language Models a Mirage? (arXiv 2304.15004)
Fact-checked and last reviewed 2026-11-05