Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
Chinchilla,
explained.
For years the race was simple: more parameters, bigger model, better AI. Then DeepMind ran the numbers and found the whole field had been building models backwards — too big, and starved of data. Their fix produced a model a quarter the size of the giants that beat all of them.
What changes against Scaling Laws: the same axis, the opposite answer
This rung exists to overturn the one below it, and it is worth being precise about how narrow the disagreement is. Rung 4 and this paper agree that test loss follows a power law in compute; they agree on the method of fitting curves to smaller runs and extrapolating; they measure the same quantity, the compute-optimal split of a fixed budget between parameters and training tokens, in the same units. They disagree only on the answer — and the disagreement is large enough to have misallocated the field's compute for two years.
Rung 4: raise compute, and grow parameters several times faster than data. This paper: grow them at roughly the same rate, which lands on the rule of thumb of about 20 training tokens per parameter.
Now put the ladder's numbers through that rule. GPT-3: 175B parameters on ~300B tokens — about 1.7 tokens per parameter, roughly a twelfth of optimal. Gopher, the 280B model this paper's authors had trained the year before on the same ~300B tokens, is about 1.1. Both were not merely suboptimal; they were spending most of their budget on the wrong side of the trade.
The proof is the part to take seriously, because it is a like-for-like swap rather than a new record: the same compute budget as Gopher, spent at the predicted ratio, produces a 70B model trained on 1.4T tokens — a quarter of the parameters, about four and a half times the data — and it outperforms the 280B model it replaces. A smaller model that is also cheaper to serve. The exercise below re-derives that 70B from Gopher's budget using nothing but the two rules.
The bigger-is-better race
After GPT-3, the headline number was parameter count. 175 billion, then 280 billion (Gopher), then 530 billion. Each lab poured its compute budget into stacking more parameters, on the assumption that size was the lever that mattered most.
But every model is really a bet about how to spend one thing — a fixed compute budget — across two knobs: how many parameters the model has, and how many tokens of data it trains on. The whole field had quietly turned one knob to the maximum and left the other alone.
The real question
DeepMind asked it precisely: for a fixed amount of compute, what split between parameters and data gives the best model? To answer, they trained over 400 models across a wide range of sizes and data amounts, and fit curves to how loss falls as you trade one knob against the other.
The answer contradicted the entire industry.
The answer: scale both, in lockstep
To use compute optimally, parameters and training tokens should grow together — roughly in equal proportion. Their rule of thumb: about 20 training tokens per parameter. A 10-billion-parameter model wants ~200 billion tokens; double the model, double the data.
Two rules turn that into an exact recipe. Training compute is C ≈ 6·N·D (params × tokens), and the optimal split sets D = 20·N. Substitute one into the other and the whole budget collapses to a single unknown:
Give me a compute budget and this returns the one best model size — no sweep, just a square root.
By that measure, GPT-3 and Gopher were wildly out of balance — enormous models fed far too little data. They were undertrained: all that parameter capacity sat half-empty because the models never saw enough text to fill it.
The earlier scaling laws (Kaplan et al., 2020) had suggested most compute should go to parameters. Chinchilla corrected that — its curves put far more weight on data — and it's why post-2022 models are trained on trillions of tokens.
The proof: Chinchilla vs Gopher
To settle it, they built Chinchilla: same compute budget as their own 280B Gopher, but spent the compute-optimal way — 70 billion parameters (a quarter the size) trained on 1.4 trillion tokens (about four times the data).
Same total compute — just a different split between the two knobs.
Why it still matters
Chinchilla rewired how the field spends compute. "Chinchilla-optimal" became standard vocabulary, and the trillion-token training runs behind LLaMA and nearly every capable model since are its direct consequence — smaller, data-rich models tuned for both quality and cheap inference.
It's also a caution against the obvious metric. For years "bigger" was the number everyone chased, and it was the wrong knob to max out. The lesson — balance your budget, don't just crank the one number people brag about — outlasts any single model.
How Chinchilla estimated the optimal split three ways
Hoffmann and colleagues trained more than 400 language models, from 70M to over 16B parameters, on 5B to 500B tokens of MassiveText, the corpus behind DeepMind's Gopher. All are decoder-only Transformers trained with a cosine learning-rate schedule whose length matches the run. The paper treats that as essential: a cosine cycle set more than about 25% longer than the actual run leaves the model clearly under-trained at the point where it is measured. Training compute is estimated as C ≈ 6ND. The question, which N and D minimize loss at a fixed C, is then answered three independent ways.
- Approach 1: fixed model sizes and the training-curve envelope. For each model size, from 70M to over 10B parameters, train four runs whose cosine schedules end at token horizons spanning a factor of 16. Smooth and interpolate each training-loss curve, so every run gives loss as a continuous function of FLOPs spent. At each FLOP count, take the lowest loss reached by any run, the envelope, and record the N and D of the run that reached it. Fitting Nopt ∝ C^a and Dopt ∝ C^b to those points gives a ≈ 0.50 and b ≈ 0.50.
- Approach 2: IsoFLOP profiles. Pick nine fixed budgets from 6 × 10^18 to 3 × 10^21 FLOPs. Within each budget, train a range of model sizes, each for exactly as many tokens as the budget allows, and plot final loss against log N. Every profile is a valley; fit a parabola and take its minimum as the best size for that budget. Power laws through the nine minima give a ≈ 0.49 and b ≈ 0.51.
- Approach 3: a parametric loss. Model every final loss from approaches 1 and 2 as L(N, D) = E + A/N^α + B/D^β. Fit the five constants by minimizing a Huber loss (δ = 10^−3) between predicted and observed log loss, using L-BFGS started from a grid of initializations; the Huber loss makes the fit robust to outlying runs. Minimizing that L subject to C = 6ND gives the exponents in closed form: a ≈ 0.46 and b ≈ 0.54.
- Project to large budgets. With approach 1's fit, the optimum at Gopher's budget of about 5.76 × 10^23 FLOPs is about 67B parameters on 1.5T tokens; a 175B model would want about 3.7T tokens, and a 280B model about 5.9T. These projections sit near 20 tokens per parameter, which is where the popular rule of thumb comes from. All three approaches put the optimum for Gopher's budget well below its 280B parameters, at roughly 40B to 70B.
- Verify with one large run. Train Chinchilla at Gopher's compute: 70B parameters on 1.4T tokens. It keeps Gopher's architecture family, with 80 layers, dmodel 8,192 and 64 heads of size 128, but uses AdamW instead of Adam, a SentencePiece tokenizer without NFKC normalization, a batch that doubles from 1.5M to 3M tokens partway through, and a slightly reweighted MassiveText mix to cover the extra tokens. The forward and backward passes run in bfloat16, with a float32 copy of the weights kept in the optimizer state.
Approaches 1 and 2 agree closely, while approach 3 leans further toward data. That gap is the part a 2024 replication went after.
The parametric loss and the compute-optimal frontier it implies
E ≈ 1.69— the irreducible loss: the entropy of natural text, which no model removes.A/N^α, with A ≈ 406.4 and α ≈ 0.34 — the shortfall of a perfectly trained model that has only N parameters.B/D^β, with B ≈ 410.7 and β ≈ 0.28 — the shortfall from seeing only D tokens, because the model is not trained to convergence.C/6— substitutes C = 6ND, so the frontier is the point on that budget where the two shortfalls trade off at the margin.
At the extremes: with unlimited data the loss floor is E + A/N^α, and with an unlimited model it is E + B/D^β. If α equalled β the split would be exactly even, a = b = 0.5. With the published α larger than β, a ≈ 0.46, so data grows a little faster than size. The 2024 refit by Besiroglu and colleagues found α ≈ 0.35 and β ≈ 0.37, which moves a back to about 0.51, in line with approaches 1 and 2.
What Chinchilla measured, and what the replication found
The three approaches, and the earlier estimate they overturned, in the same units (Nopt ∝ C^a, Dopt ∝ C^b):
| Estimate | a (parameters) | b (tokens) |
|---|---|---|
| Approach 1: training-curve envelope | 0.50 | 0.50 |
| Approach 2: IsoFLOP profiles | 0.49 | 0.51 |
| Approach 3: parametric fit | 0.46 | 0.54 |
| Kaplan and colleagues (2020) | 0.73 | 0.27 |
Then the verification, at Gopher's compute:
| Model | Parameters | Training tokens | Tokens per parameter | MMLU, 5-shot |
|---|---|---|---|---|
| GPT-3 | 175B | ~300B | ~1.7 | 43.9% |
| Gopher | 280B | ~300B | ~1.1 | 60.0% |
| Chinchilla | 70B | 1.4T | ~20 | 67.6% |
Chinchilla outperformed Gopher, GPT-3 and other far larger models on almost every evaluation reported: 7.6 points better on MMLU, an average of 65.1% against 54.4% on BIG-bench, and better on language modeling, reading comprehension, closed-book question answering and common-sense tasks. A deployment bonus comes free: a 70B model is far cheaper and faster to fine-tune and serve than a 280B one.
The negative results
The cycle-length ablation is the paper's own: cosine schedules set much longer than the run produced clearly worse models, the mechanism behind the earlier misallocation. The external one came in 2024, when Besiroglu, Erdil, Barnett and You at Epoch AI reconstructed approach 3's data points from the paper's plot and refit the same functional form. They reported that the published fit matched the reconstructed data poorly, that its confidence intervals were implausibly narrow for a few hundred training runs, and that their refit gave nearly equal exponents. That undercuts approach 3's estimate while supporting the paper's headline conclusion.
What the authors admit, and what happened next
The paper's own caveats are load-bearing. The fit is over a specific family of models, tokenizer and training setup, and the authors do not claim the ~20:1 coefficient transfers outside it. They note their largest verification run is a single model, so the confirmation of the extrapolation rests on one data point at the scale that matters most. And they are clear that the objective being optimised is training compute for a target loss — not the total cost of the model over its life.
That last one turned out to be the important limitation, and it was the field rather than the paper that drew the conclusion: if a model is going to serve a great many requests, inference cost dominates, and you should deliberately train past the compute-optimal point — a smaller model on far more tokens than 20:1 — because you pay the extra training once and save on every query. Most widely deployed open-weight models since are trained well beyond Chinchilla-optimal for exactly this reason, which means the rule is routinely and knowingly violated in production. It is not a refutation; it is a different objective function.
How it held up otherwise: the correction itself held. The claim that parameters and data should scale together is now standard, and "Chinchilla-optimal" entered the vocabulary. The trillion-token training runs behind essentially every capable model since are downstream of this page. Rung 6 then attacks the axis this paper does not measure at all.
Re-derive Chinchilla from Gopher's budget
The paper's headline model isn't a mystery — it's a square root. This takes Gopher's exact compute budget and spends it compute-optimally using just the two rules (C = 6·N·D and D = 20·N), landing on ~65B parameters and ~1.3T tokens — essentially the 70B / 1.4T Chinchilla the authors actually built. Then it scores GPT-3, Gopher, and Chinchilla on tokens-per-param and flags which were starved of data. Change the budget and watch the optimal model resize.
Write the body of optimal_split. Everything else in the file is
already written; this is the function the paper is about. Press ▶ Run to check it against
the 5 assertions below — they start red.
- Chinchilla trained at ~20 tokens per parameter
- Gopher's compute is 6·N·D ≈ 5e23 FLOPs
- Spending that budget optimally lands near Chinchilla's 70B
- The optimal split always obeys the 20:1 rule
- Gopher was badly undertrained (well under 20:1)
Questions people ask about Chinchilla
What is the Chinchilla scaling law formula?
The Chinchilla paper's parametric law is L(N, D) = E + A/N^α + B/D^β, where N is the number of parameters and D the number of training tokens. Its published fit was E = 1.69, A = 406.4, B = 410.7, α = 0.34 and β = 0.28. Minimizing that loss under the compute constraint C ≈ 6ND gives N_opt proportional to C^a and D_opt proportional to C^b, with a = β/(α+β) and b = α/(α+β). The paper's headline conclusion rests on all three of its estimation methods, which put a and b near 0.5 each: double the compute, and both model size and data should grow by about 1.4 times. In practice that works out to roughly 20 training tokens per parameter.
What are IsoFLOP curves?
An IsoFLOP curve fixes a training budget in FLOPs and varies how it is spent. In the Chinchilla paper's second method, the authors chose nine budgets between 6 × 10^18 and 3 × 10^21 FLOPs, trained models of many sizes within each budget, giving each model exactly the number of tokens the budget allows, and plotted final loss against model size on a log scale. Each curve is a valley: too small a model cannot make use of its data, and too large a model sees too few tokens. A parabola fitted to each valley gives the best size for that budget, and a power law through those minima gave N_opt proportional to C^0.49 and D_opt proportional to C^0.51.
What was wrong with Chinchilla's third approach, according to Epoch AI?
In 2024, Tamay Besiroglu, Ege Erdil, Matthew Barnett and Josh You of Epoch AI tried to replicate the parametric fit. Because the raw losses were not published, they reconstructed the data points from the paper's plot and refit L(N, D) = E + A/N^α + B/D^β. They reported that the published constants fit the reconstructed data poorly, that the reported confidence intervals were far too narrow to have come from a few hundred training runs, and that their own refit gave α of about 0.35 and β of about 0.37. With nearly equal exponents, model size and data scale at about the same rate, consistent with the paper's other two methods and with roughly 20 tokens per parameter. The critique weakens one estimate, not the conclusion.
How many tokens should you train a model on for its size?
Under the Chinchilla analysis, about 20 tokens per parameter for compute-optimal training: roughly 200 billion tokens for a 10-billion-parameter model and 1.4 trillion for 70 billion. The paper's own projections give about 1.5 trillion tokens at 67 billion parameters and about 3.7 trillion at 175 billion. That ratio minimizes training loss for a fixed training budget, which is not the only cost that matters. If a model will serve a large volume of requests, it is common to train a smaller model on far more than 20 tokens per parameter, paying more once in training to save on every query; Meta's Llama models are well-known examples of deliberately going past the ratio.
Why did the earlier scaling laws recommend bigger models than Chinchilla?
Kaplan and colleagues (2020) found that model size should grow as about C^0.73 and data as C^0.27, while Chinchilla found about C^0.5 for each. Hoffmann and colleagues attributed the gap mainly to schedules: Kaplan's runs shared one learning-rate schedule length regardless of how long each was trained, so intermediate points of long schedules stood in for shorter runs, understating what smaller models trained to completion can reach. Chinchilla matched each cosine cycle to its run. Later analyses disagree on how much that explains: Pearce and Song (2024) credited Kaplan counting only non-embedding parameters at small scale, and Porian and colleagues (2024) credited final-layer compute, warmup and untuned optimizer settings.
4 questions to test what you just read
Work each one out before you open it — a number, a prediction or a reason, not a definition. Producing the answer is what makes it stick. Your progress is kept on this device.
With C ≈ 6ND and D = 20N, what are N* and D* for Gopher's budget of about 5.76 × 10^23 FLOPs?
Show answer
C = 120N^2, so N* = √(5.76 × 10^23 / 120) = √(4.8 × 10^21) ≈ 69B and D* = 20N* ≈ 1.4T — Chinchilla's 70B on 1.4T. The page's exercise uses 6 × 280B × 300B = 5.04 × 10^23, which gives about 65B.
With the published fit (α = 0.34, β = 0.28), what share of each decade of extra compute goes to parameters? With Epoch's refit (α ≈ 0.35, β ≈ 0.37)?
Show answer
a = β/(α+β): published 0.28/0.62 ≈ 0.45 (0.46 from unrounded values); refit 0.37/0.72 ≈ 0.51. A 10× budget grows N by 10^0.45 ≈ 2.8× versus 10^0.51 ≈ 3.2×, and D takes the rest.
On an IsoFLOP profile, how does the loss of a model far to the right of the valley's minimum compare, and why?
Show answer
Higher. At fixed C, a larger N leaves only D = C/6N tokens, so the data term B/D^β grows faster than the parameter term A/N^α shrinks. Far to the left the reverse happens: too few parameters. The minimum is where the two marginal effects balance.
Why did approach 1 train four runs per size with cosine schedules ending at different horizons, instead of reading one long run at intermediate points?
Show answer
A cosine schedule reaches its best loss only at the end of its cycle. A checkpoint midway through a long cycle has not had its learning rate decayed, so it sits above what a run planned for that length would reach. Reading those points would understate short runs, the bias the paper blames for the earlier, larger-model recommendation.
Pre-training, and the scaling laws
The ladder where rung 5 overturns rung 4. Read `scaling-laws` before `chinchilla` — the second measures the same axis in the same units and gets a different answer.
- 1BERT2019
- 2T52020
- 3GPT-32020
- 4Scaling Laws2020
- 5Chinchilla2022
- 6Textbooks Are All You Need2023
- 7Muon2024
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Paper Breakdowns
- Attention Is All You NeedThe paper that introduced the Transformer — the architecture underneath GPT, BERT, Claude, and Gemini. Self-attention, Query/Key/Value, multi-head attention, positional encoding, and the real BLEU results, explained in depth with analogies and animated visuals, not just equations.Read →
- BERTThe paper that made "pre-train once, fine-tune anywhere" the default for NLP. Bidirectional context, masked language modeling, next-sentence prediction, the [CLS]/[SEP] tokens, and the GLUE sweep — explained with analogies, not just equations.Read →
- Chain-of-Thought PromptingShow a model a few worked examples with their reasoning and it starts solving problems it used to fail. Why reasoning emerges only at scale, the GSM8K jump, zero-shot "Let's think step by step", and how CoT seeded modern reasoning models.Read →
- LoRAThe paper that made fine-tuning affordable. Freeze the giant pretrained model and train two tiny low-rank matrices instead — up to 10,000x fewer trainable parameters, no extra inference latency, and swappable per-task adapters. The road to QLoRA and PEFT.Read →
- Direct Preference OptimizationRLHF without the RL. Align a model to human preference pairs with one simple classification-style loss — no separate reward model, no unstable reinforcement learning. Why "your LM is secretly a reward model", and how DPO became the default alignment method.Read →
- FlashAttentionAttention was slow for the wrong reason. By treating it as a memory-movement problem — tiling, online softmax, keeping work in fast SRAM instead of slow HBM — FlashAttention makes exact attention several times faster and cuts its memory from quadratic to linear, unlocking long context windows.Read →