Skip to content
DAH
Wiki/Scaling LawsTheoryActive

Neural scaling laws and compute-optimal training

Empirical power laws relating loss to model size, data and compute, used to choose how big a model to train and on how many tokens before spending the budget.

On this page14 sections
Why other work relies on it

Labs set model size and token count for multi-million-dollar training runs from fitted scaling laws, so errors in the fits translate directly into wasted compute.

Smooth rules predicting how a model's error falls as it gets bigger and sees more text.

  1. 1Train many small models
  2. 2Fit a power law to the losses
  3. 3Extrapolate to the big run
  4. 4Choose size and data together

What they are for. A large language-model training run costs millions of dollars. Before spending that, a lab must decide how big the model should be (parameters, NN) and how much text to train it on (tokens, DD). Scaling laws are fitted formulas that predict the final loss from NN and DD, using a series of much cheaper small runs.

The loss. The model is trained to predict the next token. Its loss, cross-entropy, measures how surprised it is on average by the true next token: if it gave the right token probability pp, the surprise is −ln⁡p-\ln p. Lower loss means better prediction.

Power laws. Kaplan et al. (2020) found that loss falls as a power law in NN, DD and compute CC: L∝N−αL \propto N^{-\alpha} for some small exponent α\alpha. Taking logarithms gives ln⁡L=−αln⁡N+const\ln L = -\alpha \ln N + \text{const}, a straight line on log-log axes, which is how such laws are spotted and fitted. A useful consequence: each tenfold increase in size cuts the loss by the same fraction, so returns diminish but never stop abruptly.

Compute-optimal training. Hoffmann et al. (2022, "Chinchilla") fitted

L(N,D)=E+ANα+BDβ,L(N, D) = E + \frac{A}{N^{\alpha}} + \frac{B}{D^{\beta}},

where EE is a floor no model can beat (the randomness of text itself), the second term is the penalty for a model that is too small, and the third the penalty for too little data. Training compute is roughly C≈6NDC \approx 6ND floating-point operations. Substituting D=C/6ND = C/6N turns minimising LL at fixed CC into a one-variable calculus problem (set the derivative with respect to NN to zero), and the answer was that NN and DD should grow in about equal proportion. Their 70-billion-parameter model trained on 1.4 trillion tokens, about 20 tokens per parameter, beat a much larger model trained on less data.

An analogy. It is like dividing a fixed budget between a bigger engine and more fuel: a huge engine with little fuel goes nowhere, and so does a small engine with a full tank. The analogy breaks because the "best split" here is measured, not derived from physics.

Disputes and limits. Chinchilla estimated the split three ways that should agree. A 2024 replication attempt rebuilt the data from the paper's figures and reported that the published formula fit disagreed with the other two methods and that its error bars were implausibly narrow; their refit agreed with the other methods. Kaplan's and Chinchilla's different answers have been traced mainly to how parameters were counted and to small scale. Repeating data, planning for heavy use after training (which favours smaller models trained longer) and mixture-of-experts models all shift the answer. Scaling laws predict loss, not specific skills, and why the exponents take their values is only partly explained.

Go deeper

The full technical text.

What the laws say

Kaplan et al. (2020) found that the cross-entropy loss of transformer language models falls as a smooth power law in non-embedding parameters N, dataset size D and training compute C, over many orders of magnitude, when the other factors are not bottlenecks. Hoffmann et al. (2022, 'Chinchilla') refitted the relationship with a parametric form in which loss is an irreducible term plus a power law in N plus a power law in D, and concluded that parameters and tokens should be scaled in roughly equal proportion for a fixed compute budget. Their 70B-parameter model trained on 1.4T tokens (about 20 tokens per parameter) outperformed a much larger model trained on fewer tokens. Chinchilla gave three estimation approaches (minimum envelope over training curves, IsoFLOP profiles, and a parametric fit); they are meant to agree.

Refinements and disputes

  • Reconciling Kaplan and Chinchilla. Pearce and Song (2024) attribute most of the discrepancy to Kaplan counting non-embedding parameters and working at small scale.
  • Replication. Besiroglu et al. (2024, preprint) reconstructed the parametric fit from data extracted from the Chinchilla figures and report that the published fit was inconsistent with the other two approaches, and that its confidence intervals were implausibly narrow for the number of experiments run; their own refit agreed with approaches 1 and 2.
  • Repeated data. Muennighoff et al. (2023) studied data-constrained regimes: repeating data for up to about four epochs was reported to cost little, with value decaying after that.
  • Inference cost. Sardana and Frankle (2023, preprint) argued that if a model will serve many requests, training a smaller model for longer than compute-optimal is cheaper in total.
  • Mixture-of-experts. Clark et al. (2022) and Krajewski et al. (2024) extend the laws to routed and fine-grained MoE models.

Limits

The laws predict pre-training loss, not capabilities on specific tasks; relating the two is a separate, active problem (see the evaluation entry). Fits also depend on learning-rate schedule, tuning and architecture, so exponents measured in one recipe need not carry to another. A theory of why the exponents take their values is partly developed for linear and random-feature models, and is tracked in the related problem on power-law spectra.

Words on this page (10)
Words on this page
scaling law
A smooth rule that predicts how a model's error falls as model size, data and computing grow.
Chinchilla
A 2022 study and model showing that model size and training text should grow together, at roughly 20 tokens per parameter.
loss
A single number measuring how wrong the model is on the training or test text. Lower is better.
token
A chunk of text, often a word or part of a word, that a language model reads as one unit.
parameter
One of the adjustable numbers inside a model. Large language models have billions of them.
FLOP
One basic arithmetic operation; the total FLOPs used measure how much computing a training run needed.
large language model
A very large neural network trained on text to predict the next token, as in modern chatbots.
power law
A relation y = a·x^(−α); on log-log axes it is a straight line with slope −α.
log-log plot
A graph with logarithmic scales on both axes, on which power laws appear as straight lines.
cross-entropy
The average of −ln p over the true answers, where p is the probability the model gave them; lower means less surprised.
New to this? Read first (4)
New to this? Read first

Understanding map

map of the whole wiki →

What to read before Neural scaling laws and compute-optimal training (left), and what builds on it: entries that depend on it and its open problems (right). Every box links to its page.

  1. Start with
  2. Step 2
  3. Step 3
  4. Then

Open problems & questions

Progress timeline

  1. Jun 12, 2024
    Kaplan versus Chinchilla reconciled

    Pearce and Song attribute the gap mainly to parameter counting and small scale.

    source
  2. Apr 15, 2024
    Chinchilla replication attempt (preprint)

    Besiroglu et al. report the published parametric fit is inconsistent with the other approaches and its intervals implausibly narrow.

    source
  3. Apr 15, 2024
    Replication attempt (preprint)
    Related to: A reproducible confidence interval for the compute-optimal tokens-per-parameter ratio

    Besiroglu et al. question the published parametric fit and its intervals.

    source
  4. Mar 29, 2022
    Compute-optimal training (Chinchilla)

    Hoffmann et al. conclude that model size and tokens should scale together and train a 70B model on 1.4T tokens.

    source
  5. Jan 23, 2020
    Power-law scaling of language-model loss

    Kaplan et al. report smooth power laws in model size, data and compute.

    source