Quant Memo
Advanced

Chinchilla Compute-Optimal Scaling

For a fixed training compute budget, the Chinchilla study found earlier large language models were badly oversized relative to how much data they saw — for compute-optimal training, model size and training tokens should scale roughly in equal proportion, not model size alone.

Prerequisites: Scaling Laws for Language Models, Gradient Descent

Before 2022, the dominant belief in large language model training was that bigger models were straightforwardly better, and the field kept scaling parameter count aggressively — GPT-3 at 175 billion parameters was trained on around 300 billion tokens, under 2 tokens per parameter. The Chinchilla paper trained over 400 models of varying sizes on varying data amounts, all under matched compute budgets, asking a sharper question than "does bigger help": for a fixed compute budget, what combination of model size and training data minimises loss? The answer overturned prevailing practice — the largest contemporary models were substantially undertrained, and a smaller model trained on far more data would have used the same compute more effectively.

The analogy: a fixed study budget split between textbooks and study hours

Imagine a student has a fixed number of hours to prepare for an exam, splittable between buying more textbooks (more parameters — more capacity) or spending more hours reading them (more training tokens — more exposure to data). A student who buys ten textbooks but only skims each will likely do worse than one who buys three and reads each thoroughly, given the same total hours. Chinchilla found the field had been buying too many textbooks and not reading them enough: model capacity was outpacing the data used to fill it.

The scaling relationship

Chinchilla modelled loss as a function of model size NN (parameters) and training tokens DD, with a fixed compute budget C6NDC \approx 6ND (a standard approximation for transformer training FLOPs):

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

In words: loss LL has an irreducible floor EE, plus a term shrinking as model size NN grows (rate α\alpha), plus a term shrinking as training tokens DD grows (rate β\beta). Minimising this subject to a fixed budget C=6NDC=6ND gives an optimal split — and the fitted exponents were close enough that Chinchilla's headline rule of thumb is: scale NN and DD in roughly equal proportion — doubling compute should roughly double both, not just model size.

Worked example 1: comparing two allocations at equal compute

Fix compute budget C=6NDC = 6ND constant. GPT-3-style allocation: N=175BN = 175\text{B}, giving D=C/(6N)D = C/(6N). Suppose C3.1×1023C \approx 3.1 \times 10^{23} FLOPs (roughly GPT-3's reported training compute). Solving for DD: D=3.1×1023/(6×175×109)295D = 3.1\times10^{23}/(6\times175\times10^9) \approx 295 billion tokens — close to what GPT-3 actually used.

Chinchilla's compute-optimal allocation for the same budget CC found roughly N70BN \approx 70\text{B}, D1.4D \approx 1.4 trillion tokens — a smaller model, trained on nearly 5× more data, using the identical compute. Chinchilla (70B, compute-optimal) outperformed Gopher (280B, undertrained on the same-order compute) on downstream benchmarks despite having 4× fewer parameters — direct empirical confirmation that the reallocation, not raw size, was what mattered.

Worked example 2: applying the rule of thumb

The commonly cited simplified Chinchilla ratio is roughly 20 training tokens per parameter. For a target model of N=13N=13 billion parameters, compute-optimal data would be approximately D20×13B=260D \approx 20 \times 13\text{B} = 260 billion tokens. Training that same 13B model on only 50 billion tokens (under 4 per parameter, GPT-3-era practice) leaves it "big enough" but never seeing enough data to use its capacity fully — Chinchilla's fitted curves predict meaningfully higher final loss than a differently-sized model using the same compute more optimally.

Function explorer
-224.4
x = 1.00f(x) = 1.000

Each loss term above falls as a power law in its respective variable (NαN^{-\alpha}, DβD^{-\beta}) — drag the exponent and watch how sharply diminishing returns set in; that shape is exactly what makes an equal split between more parameters and more data outperform pouring the whole compute budget into parameters alone.

training tokens (D) model size (N) GPT-3-style: big N, less D Chinchilla-style: balanced N and D, same compute
Both points sit on the same fixed-compute curve, but the Chinchilla-style allocation trades some model size for far more training tokens and achieves lower loss.

For a fixed compute budget, loss is minimised not by maximising model size alone but by scaling model size and training data together in roughly equal proportion — earlier large models like GPT-3 and Gopher were oversized relative to the data they were trained on, and a compute-matched smaller model trained on far more tokens outperformed them.

What this means in practice

Chinchilla scaling reshaped how labs allocate training compute: rather than chasing ever-larger parameter counts, most modern frontier models are trained on token counts well beyond the naive "20× parameters" ratio, especially once inference cost is factored in — a smaller, more thoroughly trained model is also cheaper to run at scale, which matters enormously for production serving cost, a consideration Chinchilla's original loss-only framing did not directly optimise for.

Chinchilla's optimum is defined purely with respect to training loss for a fixed compute budget — it says nothing about inference cost, which many practitioners care about more once a model is deployed at scale. A smaller-than-Chinchilla-optimal model trained on even more tokens than the formula recommends can still make sense if it will be served billions of times, because the one-time extra training compute is repaid by cheaper inference forever after — this is why some later models are deliberately trained well past the Chinchilla-optimal point.

Practice

  1. If compute budget doubles and the Chinchilla ratio is held fixed, roughly how should both NN and DD change?
  2. A team has a fixed compute budget and plans to serve their model billions of times after training. Explain in one sentence why they might rationally choose an allocation that is smaller-NN and larger-DD than the pure loss-minimising Chinchilla point.

Related concepts

Practice in interviews

Further reading

  • Hoffmann et al., Training Compute-Optimal Large Language Models (2022)
  • Kaplan et al., Scaling Laws for Neural Language Models (2020)
ShareTwitterLinkedIn