TL;DR
Training a language model costs compute, and that compute is roughly the number of parameters times the number of training tokens. For a fixed budget you have to choose the split: a huge model seen briefly, or a smaller model seen for longer. Compute-optimal training picks the split that gives the lowest loss for that budget.
The answer from the 2022 Chinchilla study is that parameters and tokens should grow together, in roughly equal proportion, which works out to about 20 training tokens for every parameter. Many large models before it had been trained with far too many parameters for the data they saw.
Where you'll see it: in planning how big a language model should be before a training run, in deciding how many tokens to collect, and in choosing a smaller model trained longer when inference cost matters more than training cost.
Intuition
A fixed amount of work to split
Think of a fixed budget of study hours before an exam. You can read one very dense textbook once, or a shorter book many times. Which gives the better score depends on how much knowledge the reader can hold and how much material there is to learn from. If you only ever reread the short book, you stop learning from it. If you own a huge book but study for only an hour, most of it stays unread.
Training a Transformer has the same shape. The model has parameters, which are its capacity to store patterns. It sees tokens, which are the material. Each parameter-token pair costs a fixed amount of arithmetic, so the total compute is the product of the two. Given a fixed product, making one factor large forces the other to be small.
The question this lesson answers is which pair is the best use of the budget. The scaling laws lesson shows that loss falls as a power law in each resource separately. Compute-optimal training combines those power laws with the fixed product and asks where the combined loss is smallest.
- fixed budget (schematic)
The math
The budget constraint
For a dense transformer, one training pass costs about two floating-point operations per parameter for the forward pass and about four for the backward pass, for each token. Together that is about six operations per parameter per token:
This is the only link between the two choices. Fix and each choice of determines :
The loss model
The 2022 study fitted a loss that depends on both resources, with an irreducible floor and two terms that fall as the model or the data grow:
Here , , , and are fitted constants. The floor is the entropy of the text itself, which no model can beat. The exponents and say how fast each term shrinks. The 2022 paper's own fit gave near and near , close to each other but not equal. Treat the fitted values as those of one study on one dataset, not universal numbers.
Finding the best split
Substitute into the loss. Since ,
Set the derivative with respect to to zero:
Rearranging gives , so
The two exponents add to one, so the two resources always share the extra compute between them. If , both and scale as . With the fitted values above the exponents are about for and for , so "equal split" is a close approximation: the Chinchilla result is that both grow at roughly the same rate, not that one dominates.
What the ratio looks like
Dividing the two optimal values gives the tokens per parameter at the optimum:
When this ratio is constant in , so the same tokens-per-parameter number applies at every budget. The study found that this ratio is about 20 across the budgets it tested, and the worked examples below use with a ratio of exactly 20 as a clean approximation.
Worked examples
Suppose the budget is floating-point operations, and we use the rule .
- Write the budget in terms of : .
- Solve for : .
- Take the square root: , about 70 billion parameters.
- Get the tokens: , about 1.4 trillion tokens.
- Check: , which matches the budget.
Interpretation: with this budget the best model is about 70 billion parameters trained on about 1.4 trillion tokens. A model four times larger on the same budget would see only about a quarter as many tokens, and the study found that such a model does worse.
Start from the same 70-billion-parameter, 1.4-trillion-token point and multiply the budget by 10. Use , so both quantities scale as the square root of the budget.
- The scale factor for each quantity is .
- New parameters: .
- New tokens: .
- Check the ratio: , the same tokens per parameter as before.
- Check the budget: , which is ten times .
Interpretation: when the budget grows, both the model and the data must grow, and at the same rate. Adding parameters alone, or adding data alone, leaves the other term as the bottleneck.
Compare two ways to spend the same budget of operations. Model A is the compute-optimal 70 billion parameters with 1.4 trillion tokens. Model B is a smaller 7 billion parameters.
- For Model B, the budget gives , which is 14 trillion tokens.
- Model B is ten times smaller than Model A and sees ten times more data. Against the 20-tokens-per-parameter rule for its own size (140 billion tokens), it is trained on about 100 times more.
- Inference cost is set by parameter count. Each query on Model B costs about a tenth of a query on Model A.
Interpretation: if the model will serve millions of queries, the total cost is dominated by inference, and a smaller model trained longer can be the better product even though it is not the lowest-loss model for the training budget alone. Compute-optimal training answers the training question, not the whole cost question.
Tradeoffs and failure modes
The rule is a training-budget rule. It does not account for what happens after training, and it assumes the fitted constants apply to your data and architecture.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Model will serve a huge number of queries | The compute-optimal model is expensive to run at inference | Train a smaller model on more tokens, accepting higher training cost for lower serving cost |
| Tokens are scarce or expensive to collect | The 20-tokens-per-parameter rule asks for more data than exists | Repeat data carefully, filter for quality, or accept a smaller model |
| Data quality varies across the corpus | Fitted constants from one corpus can overstate gains on a noisier one | Refit on a small pilot run with your own mix |
| Fitting the schedule with a fixed learning-rate decay | Comparing models at intermediate points can mislead | Let each run finish its own schedule before comparing |
| Extrapolating the rule to a very different architecture | The exponents and the constant of 20 depend on setup | Measure the ratio on your architecture at a few small scales first |
History
In 2020 Jared Kaplan and colleagues at OpenAI published a systematic study of how language-model loss depends on parameters, data and compute. Their fitted allocation put most of an extra compute budget into model size, with comparatively little into tokens. Their training runs did not all reach the same point in their learning-rate schedule, and that choice shaped the answer they got.
In 2022 a team at DeepMind led by Jordan Hoffmann re-ran the comparison with more careful controls. They trained many models over a range of sizes and token counts, fitted the loss surface, and found that the best split grows parameters and tokens at roughly the same rate. To test the conclusion they trained Chinchilla, a 70-billion-parameter model on about 1.4 trillion tokens, with about the same compute as Gopher, a model of 280 billion parameters trained on about 300 billion tokens. Chinchilla beat the larger model on a broad set of benchmarks, which made the point in a concrete way.
The result changed how many teams plan training runs. Later open models were trained on far more tokens than earlier models of similar size, and the question shifted from how large a model to build toward how much data to gather for a given model size. The rule is also now debated, because a model's serving cost can justify training past the compute-optimal point.
Check yourself
QuestionWhy does a fixed compute budget force a choice between parameters and tokens?Show answer
Training compute is roughly , the product of parameter count and token count. With fixed, increasing forces to fall, and the reverse holds too. The loss depends on both, so neither term can be pushed to zero by growing one resource alone. The optimal split is the one that balances the two terms.
QuestionA budget is operations and the rule is . Find and .Show answer
Substitute into : , so . Then , about 32 billion parameters. The tokens are , about 630 billion. Check: .
QuestionIf in the loss model, how do the optimal parameters and tokens change when the budget grows 100 times?Show answer
With both and scale as . A 100-fold budget increase multiplies each by . The ratio of tokens to parameters stays the same, so the model and the data both grow tenfold. Adding only parameters, or only tokens, would leave the other term as the bottleneck.
QuestionA team serves a model to millions of users and must choose between the compute-optimal 70-billion-parameter model and a 7-billion-parameter model trained on more tokens with the same training budget. Which would you pick, and why?Show answer
For training cost alone the compute-optimal model has the lower loss. But serving cost is set by parameter count, so the 7-billion model is about ten times cheaper per query. With millions of queries, inference can dominate total cost, which favours the smaller model trained longer. The answer depends on the expected number of queries and on how much loss matters for the product, so the honest choice compares total cost over the model's lifetime, not training cost alone.