# Training Compute-Optimal Large Language Models

Language models should grow model size and training tokens in equal proportion

Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford and 16 more · arXiv · 2022-3-29

- **Problem** Recent large models grew in size while keeping training data constant, so they are likely undertrained for their compute budget.
- **Method** The authors fit loss against model size and tokens, then pick the best split per budget.
- **Results** Chinchilla, with 70B parameters on the same compute as Gopher, reaches 67.5% average accuracy on MMLU, a 7% improvement over Gopher.

## Why the earlier scaling advice left models undertrained

Kaplan et al. (2020) showed a power law between parameter count and language model performance. That result pushed the field to keep training larger and larger models rather than training them on more data. The open question was therefore how to split a fixed compute budget between model size and the number of training tokens.

Kaplan et al. (2020) used a fixed number of training tokens and a fixed learning rate schedule for all models. This choice prevented them from modelling how those hyperparameters affect the final loss. The authors find that matching the learning rate schedule to the number of training tokens gives the best final loss regardless of model size.

Using these inflated intermediate losses underestimates how effective training on less than 130B tokens is.

Kaplan et al. (2020) reported exponents of 0.73 for model size and 0.27 for tokens. The authors' own analysis instead predicts that model size and training tokens should scale at roughly the same rate. Their analysis also includes models up to 16B parameters, while most runs in Kaplan et al. (2020) are under 100M parameters. The majority of models in this analysis have more than 500 million parameters.

Their predictions suggest that the largest models, such as Gopher, are substantially over-sized for their compute budgets. The authors propose three predictive approaches to set model size and training duration from over 400 training runs. They test this claim by training Chinchilla, a 70B parameter model, which outperforms Gopher.

## Modelling loss as a function of size and tokens

The section starts from the final pre-training loss, which the authors model as a function of parameter count N and token count D. Since the computational budget C is a deterministic function FLOPs(N, D) of the seen tokens and parameters, the goal is to minimise L under FLOPs(N, D) = C. Solving this constrained problem gives N\_opt(C) and D\_opt(C), which describe the optimal allocation of a computational budget C.

The authors treat the loss as the quantity to minimise, so the search is over the split between N and D rather than over a single number. Training many horizons per model size means each model contributes a range of token counts, which the three methods need. The authors then smooth and interpolate each training loss curve, and for each FLOP count they pick the run with the lowest loss.

This gives a mapping from any FLOP count C to the most efficient model size N and token count D with FLOPs(N, D) = C.

The authors assume the efficient computational frontier follows a power law in compute, model size and token count. They note that the frontier may show some concavity at high compute budgets, which this assumption doesn't capture. The concavity observed in log N\_opt suggests the authors may still be overestimating the optimal size of large models.

All training runs used for the analysis covered less than one epoch of data, so the multiple-epoch regime wasn't tested.

The power-law form is the working assumption, and the three approaches that follow each estimate the frontier from these runs. The predictions from the three approaches are similar, and all suggest that N and D should grow in equal proportions with compute.

## Three ways to estimate the frontier

The first approach fixes a family of models and varies the number of training tokens for each one. It trains each model from 70M to over 10B parameters for 4 different numbers of training sequences. Each run's training loss curve is smoothed and interpolated, which gives a continuous mapping from FLOP count to training loss.

The second approach, IsoFLOP profiles, fixes 9 training FLOP counts and varies the model size at each one. A parabola is fitted to each IsoFLOP curve to locate the model size with the minimum loss. Power laws then give exponents a = 0.49 and b = 0.51.

The third approach fits one parametric function to all final losses from Approaches 1 and 2. The function is L̂(N, D) = E + A/N^α + B/D^β, fitted with the Huber loss on log loss using L-BFGS. The first term is the entropy of natural text, the second is the shortfall of a perfectly trained transformer, and the third is the shortfall from unconverged training.

Minimising under FLOPs(N, D) ≈ 6ND gives a = β/(α+β) and b = α/(α+β), so the fit yields a = 0.46 and b = 0.54.

All three approaches produce similar exponents, so model size and training tokens should grow in roughly equal proportion. The first and second approaches give very similar optimal model sizes, while the third predicts even smaller optimal models at larger budgets. The Huber loss down-weights low-compute points, which the authors treat as outliers, and that lowers the predicted N\_opt.

## Do the three estimates agree on how size and data should grow

All three estimators point to the same answer: parameter count and training tokens should grow in roughly equal proportion as compute increases. The IsoFLOP profiles give 0.49 for model size and 0.51 for tokens. The parametric fit gives 0.46 for model size and 0.54 for tokens, a slightly more skewed split. Because both quantities grow at roughly the same rate, the authors conclude that size and data should be increased in equal proportions.

Kaplan et al. (2020) appears in the same table with exponents of 0.73 and 0.27, a far more skewed split.

The parametric approach fits a loss of the form E plus A over N to the alpha power plus B over D to the beta power. It minimizes the Huber loss between predicted and observed log loss, using L-BFGS. Its closed-form frontier gives the exponents a equal to beta over alpha plus beta, and b equal to alpha over alpha plus beta. The third approach predicts even smaller optimal models at larger budgets, which the authors link to the negative curvature they observe in the frontier.

The Huber loss gives more weight to the high-compute points, so low-compute points with larger residuals are treated as outliers. Because the Huber loss treats those low-compute points as outliers, this approach ends up with a lower N\_opt than the other two.

The authors repeat the IsoFLOP analysis on C4 and GitHub code. Both extra datasets lead to the same conclusion of equal scaling for model size and training tokens. Table 3 turns the Approach 1 projections into concrete compute and token counts for each model size. The Approach 2 and 3 estimates are similar, and the authors report them in Section D.3.

For Gopher-scale budgets, the same frontier points to a model of 40 to 70 billion parameters trained on more tokens. This range sets up the Chinchilla test, which trains a 70B model on 1.4T tokens.

## What the frontier implies for Gopher-scale budgets

The fitted frontier makes a concrete prediction for the compute budget already spent on Gopher. For that budget, the authors predict an optimal model should be 4 times smaller and trained on 4 times more tokens. The estimated optimum for that budget falls somewhere between 40 and 70 billion parameters. Chinchilla tests this prediction at the top of that range, with 70B parameters trained on 1.4 trillion tokens.

Chinchilla uses the same compute budget as Gopher, so the comparison isolates the effect of the model size and token split.

Because Chinchilla is 4 times smaller than Gopher, its memory footprint and inference cost are also smaller.

The projected token counts are far beyond what models currently use, which the authors take as a call for better dataset collection. The authors stress that these extrapolations span many orders of magnitude and carry significant uncertainty. They also reproduce the IsoFLOP analysis on C4 and GitHub code, reaching the same conclusion of equal scaling in parameters and tokens.

## How Chinchilla was trained

Chinchilla keeps the architecture and training setup of Gopher, with a few deliberate exceptions. It trains on MassiveText, the same dataset as Gopher, but uses a slightly different subset distribution. The subset distribution is shown in Table A1, and it accounts for the larger number of training tokens. Chinchilla uses AdamW instead of Adam, because the authors found it improves the language modelling loss and downstream task performance after finetuning.

Interestingly, the AdamW model only matches the Adam model's training performance about 80% of the way through the cosine cycle. Its ending performance is notably better, though. Chinchilla's SentencePiece tokenizer doesn't apply NFKC normalisation, which the authors modified from the Gopher version. Its vocabulary is very similar, with 94.15% of tokens matching those used for training Gopher.

The forward and backward passes run in bfloat16, but Chinchilla keeps a float32 copy of the weights. That float32 copy sits in the distributed optimiser state, as described by Rajbhandari et al. (2020). Chinchilla was trained on TPUv3 and TPUv4 hardware, using JAX and Haiku. Table 4 lists the layers, key/value size, dmodel, maximum learning rate and batch size for both models.

Chinchilla uses 64 heads and a maximum learning rate of 1 × 10−4, against 128 heads and 4 × 10−5 for Gopher. Both models double their batch size midway through training.

Being four times smaller than Gopher, Chinchilla has a smaller memory footprint. Its inference cost is also smaller, because downstream fine-tuning and inference make up substantial compute usage.

## Language modelling and MMLU results

On The Pile, Chinchilla beats Gopher on every evaluation subset, measured in bits-per-byte. The Pile results are shown as the decrease in bits-per-byte of Chinchilla compared to Gopher. On Wikitext103, Chinchilla achieves a perplexity of 7.16, compared to 7.75 for Gopher. Chinchilla is trained on 4 times more data than Gopher, so train/test leakage may artificially enhance these results.

For this reason the authors place more emphasis on tasks where leakage is less of a concern.

On MMLU, the 5-shot average accuracy of Chinchilla is 67.6%, compared to 60.0% for Gopher under the same protocol. Chinchilla also outperforms the June 2023 forecast of 63.4%, which the authors call a remarkable result. The authors know of no other model that has exceeded 90% accuracy on a subset.

The four tasks where Chinchilla underperforms Gopher are college\_mathematics, econometrics, moral\_scenarios, and formal\_logic. Chinchilla doesn't change performance on two tasks compared to Gopher.

## Reading, BIG-bench and closed-book QA results

On reading comprehension, Chinchilla reaches 77.4% on LAMBADA, against 74.5% for Gopher and 76.6% for MT-NLG 530B. On RACE-h and RACE-m, Chinchilla improves accuracy over Gopher by more than 10% in both cases. GPT-3 and MT-NLG 530B use a different prompt format on RACE, so their scores aren't directly comparable to these results.

Chinchilla reaches an average accuracy of 65.1%, while Gopher reaches 54.4%. Chinchilla does worse than Gopher on only four tasks: crash\_blossom, dark\_humor\_detection, mathematical\_induction and logical\_args.

On Natural Questions, Chinchilla reaches 31.5% in 5-shot and 35.5% in 64-shot. The text compares these with 21% and 28% for Gopher, while Table 9 lists Gopher at 24.5% and 28.2%. The 5-shot Gopher figure differs between the text and the table, so the size of that gain depends on which one you use.

On TriviaQA, Chinchilla substantially outperforms Gopher on both the filtered and unfiltered sets. On the filtered version, Chinchilla lags behind the open book SOTA by only 7.9%.

## Common sense and TruthfulQA results

On the zero-shot common sense benchmarks, Chinchilla is compared against Gopher, GPT-3 and MT-NLG 530B. Chinchilla matches or outperforms Gopher and GPT-3 on all tasks. It outperforms the much larger MT-NLG 530B on all but one task. The benchmarks are HellaSwag, PIQA, Winogrande, SIQA and BoolQ. Chinchilla scores 80.8% on HellaSwag, against 79.2% for Gopher and 78.9% for GPT-3.

On Winogrande, Chinchilla reaches 74.9%, compared to 70.1% for Gopher and 73.0% for MT-NLG 530B. On BoolQ, Chinchilla scores 83.7%, compared to 79.3% for Gopher.

On TruthfulQA, Chinchilla reaches 43.6% in 0-shot, 58.5% in 5-shot and 66.7% in 10-shot. The 0-shot gain is 14.1%, which is far larger than the other gains on this benchmark. This result runs against the findings of Lin et al. (2021), who reported the opposite trend.

## Gender bias and toxicity checks for Chinchilla versus Gopher

On Winogender, Chinchilla resolves pronouns correctly more often than Gopher across all groups, in a zero-shot setting. Overall, Chinchilla reaches 78.3% accuracy, compared to 71.4% for Gopher. The authors follow the same Winogender setup as Rae et al. (2021), and an unbiased model would resolve pronouns regardless of their gender. The gain is smaller for male pronouns, at 3.2%, than for female pronouns at 8.3% and neutral pronouns at 9.2%.

On gotcha examples, where the correct resolution contradicts gender stereotypes, Chinchilla again resolves pronouns more accurately than Gopher. The largest gain is on female gotcha examples, at 10%.

The authors conclude that the rate of improvement differs between pronouns, so the gains from a more compute-optimal model are uneven. Table 10 also shows that Chinchilla's male gotcha accuracy is 62.5%, against 59.2% for Gopher. Language models can generate insults, hate speech, profanities and threats, so the authors also check toxicity.

The mean toxicity score is 0.081 for Gopher, with a median of 0.064. Chinchilla's mean toxicity score is 0.087, with a median of 0.066. The 95th percentile score is 0.230 for Gopher and 0.238 for Chinchilla. Most generated samples are classified as non-toxic, so the gap between the two models is small. Consistent with Rae et al. (2021), toxicity in unconditional generation appears largely independent of model quality measured by language modelling loss.

## Limitations of the frontier and the Chinchilla result

The frontier rests on only two comparable training runs at large scale, Chinchilla and Gopher. The authors didn't test intermediate scales, so the fit isn't checked between the 10B models and the 70B model. The analysis assumes the efficient computational frontier follows a power law in compute, model size and training tokens. The authors flag that future work may want to include curvature in this relationship for large model sizes.

The authors observe some concavity in log N\_opt at high compute budgets. That concavity suggests the optimal size of large models may still be overestimated. The Approach 3 fit already predicts smaller optimal models at larger budgets, which points the same way.

Every analysis run used less than one epoch of data, so the multiple-epoch regime wasn't studied. The authors speculate that scaling to larger datasets only helps when the data is high-quality. They flag toxicity, bias and privacy risks that grow as training data grows.

## Paper info

- **Authors**: Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, Laurent Sifre
- **Venue**: arXiv · Preprint
- **First published**: 2022-3-29
- **Added**: 2026-10-20
- **Updated**: 2022-3-29
- **Version**: v1
- **arXiv**: 2203.15556
- **Category**: cs.CL · cs.LG
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2203.15556v1) · [PDF ↗](https://arxiv.org/pdf/2203.15556v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae et al. (2022). Training Compute-Optimal Large Language Models. arXiv:2203.15556v1. https://arxiv.org/abs/2203.15556v1

**BibTeX**

```
@misc{hoffmann2022training,
  title = {{Training Compute-Optimal Large Language Models}},
  author = {Jordan Hoffmann and Sebastian Borgeaud and Arthur Mensch and Elena Buchatskaya and Trevor Cai and Eliza Rutherford and Diego de Las Casas and Lisa Anne Hendricks and Johannes Welbl and Aidan Clark and Tom Hennigan and Eric Noland and Katie Millican and George van den Driessche and Bogdan Damoc and Aurelia Guy and Simon Osindero and Karen Simonyan and Erich Elsen and Jack W. Rae and Oriol Vinyals and Laurent Sifre},
  year = {2022},
  eprint = {2203.15556},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.15556v1}
}
```

## Other paper commentary

- [Llama 2: Open Foundation and Fine-Tuned Chat Models](https://refivu.com/en/papers/5c1523c3-cd1c-48ba-8289-86de02d688dd-llama-2-open-foundation-and-fine-tuned-chat.md)
- [PaLM: Scaling Language Modeling with Pathways](https://refivu.com/en/papers/31a94910-97f3-470b-a240-6c8b698de722-palm-scaling-language-modeling-with-pathways.md)
- [Mistral 7B](https://refivu.com/en/papers/9993f1cb-8618-4aeb-9dc5-d4a5aa598381-mistral-7b.md)
- [Scaling Laws for Neural Language Models](https://refivu.com/en/papers/0b00379f-9c4e-4d81-be48-4963190a673b-scaling-laws-for-neural-language-models.md)
- [Language Models are Few-Shot Learners](https://refivu.com/en/papers/82602214-e941-40a1-bc42-5b92c1268a53-language-models-are-few-shot-learners.md)
- [RoBERTa: A Robustly Optimized BERT Pretraining Approach](https://refivu.com/en/papers/3dc17b50-5c0f-4503-a368-4b0d9e86745c-roberta-a-robustly-optimized-bert-pretraining-approach.md)
- [Denoising Diffusion Probabilistic Models](https://refivu.com/en/papers/3a1faf88-ed3a-4c3a-bf1e-1afc6e7184fa-denoising-diffusion-probabilistic-models.md)
- [Mastering Atari, Go, Chess and Shogi by Planning with a Learned Model](https://refivu.com/en/papers/b99bbef4-e405-4227-881f-01ef69bed080-mastering-atari-go-chess-and-shogi-by-planning.md)
- [Mixtral of Experts](https://refivu.com/en/papers/5e1d3fc2-10c6-4121-ba03-4ef4430aadca-mixtral-of-experts.md)
- [High-Resolution Image Synthesis with Latent Diffusion Models](https://refivu.com/en/papers/33bd1500-c829-47e5-9545-ad078523241e-high-resolution-image-synthesis-with-latent-diffusion-models.md)
- [Omni-IO Skills: Harnessing Your Agent Omni-Native](https://refivu.com/en/papers/c9256504-03a5-48bb-be13-10d8a0c09d49-omni-io-skills-harnessing-your-agent-omni-native.md)

## Terms in this paper

- [Accuracy](https://refivu.com/en/terms/1995c0cd6282-accuracy)
- [perplexity](https://refivu.com/en/terms/2b204e513801-perplexity)
- [MMLU](https://refivu.com/en/terms/3036c0ba5adb-mmlu)
- [Transformers](https://refivu.com/en/terms/ab75807099b0-transformers)
- [L-BFGS](https://refivu.com/en/terms/433a40c1d5e1-l-bfgs)
- [LAMBADA](https://refivu.com/en/terms/b86e10054a54-lambada)
- [The Pile](https://refivu.com/en/terms/fd2fd47693ec-the-pile)
- [Natural Questions](https://refivu.com/en/terms/2053f89c9387-natural-questions)
- [SentencePiece](https://refivu.com/en/terms/acec043085a4-sentencepiece)
- [power law](https://refivu.com/en/terms/7bd8b1cdba43-power-law)
- [Chinchilla](https://refivu.com/en/terms/e6970f1e409c-chinchilla)
- [BIG-bench](https://refivu.com/en/terms/e4ba3897cd9d-big-bench)
- [cosine schedule](https://refivu.com/en/terms/9a0025eb03ca-cosine-schedule)
- [MassiveText](https://refivu.com/en/terms/c4b0f5770da0-massivetext)
- [Wikitext103](https://refivu.com/en/terms/5f648bba23be-wikitext103)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/84ae39a3-a983-4a03-97c6-eb2fd1232152-training-compute-optimal-large-language-models)
