A DeepMind study of 400+ models shows size and training text should grow together; the 70B Chinchilla beat the 280B Gopher.
Training a large language model costs a huge amount of computing power, and you usually get to do it only once. So one question matters a lot: for a fixed amount of computing, how big should the model be, and how much text should it read while learning? Before this paper, the common answer was "make the model as big as you can." The authors tested that answer carefully and found it was wrong.
Training Compute-Optimal Large Language Models, by Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Laurent Sifre and colleagues at DeepMind. arXiv:2203.15556, March 2022. Read it at arxiv.org/abs/2203.15556.
For a fixed computing budget, model size and the amount of training text should grow together, in equal proportion.
The authors trained more than 400 models of many sizes to find the best split. They then used the answer to build Chinchilla, a 70-billion-parameter model. It beat Gopher, a 280-billion-parameter model that used the same training compute.
A parameter is one adjustable number inside the model. The model's size, , is its count of parameters. A token is a small piece of text, such as a word or part of a word. The amount of training text, , is counted in tokens.
The paper measures the budget in FLOPs, which means floating-point operations, a count of arithmetic steps. For this kind of model, a common estimate is:
The paper checks this estimate against its exact count and finds the two are close (Table A4). Because is fixed, a bigger forces a smaller .
Toy example (my own numbers). Let . A 30-billion-parameter model can read billion tokens. A 1-billion-parameter model can read about 1.67 trillion tokens. Same budget, very different models.
The loss is a number that measures how wrong the model's next-word guesses are on text. Lower is better. The paper asks for the and that give the lowest final loss under .
When you plot loss against model size for one fixed budget, you get a valley. A model that is too small cannot store enough. A model that is too big gets too little text to learn from. The best model sits at the bottom.
The authors used three different methods. They wanted to see whether the answers agreed.
is the loss of a perfect model. The term is the penalty for a model that is too small. The term is the penalty for too little training. The paper fits , , , and to its runs, then finds the best and for each budget.
A power law is a relation of the form . Here the paper fits the best size as and the best token count as .
Toy example (formula check). The paper's fitted values are , , , with exponents 0.34 and 0.28. I put the two big models into the formula:
| Model | Predicted loss | ||
|---|---|---|---|
| Gopher | 280B | 300B | 1.99 |
| Chinchilla | 70B | 1.4T | 1.94 |
The smaller model gets the lower predicted loss. This matches what the paper's authors expected, and they then trained Chinchilla to test it.
The exponent for the number of tokens is . It comes out as 0.50, 0.51 and 0.54 for the three approaches. Both exponents are close to 0.5.
What this means. If the exponents are both 0.5, then 10 times more budget gives about times the parameters and 3.2 times the tokens. The earlier study by Kaplan et al. (2020) suggested 5.5 times the parameters and only 1.8 times the tokens for the same 10 times more budget.
Kaplan et al. used one fixed learning-rate schedule for all runs. The learning rate is the size of each learning step, and a schedule shrinks it over time. In the paper's analysis, a schedule that is too long for the run leaves the model still taking large steps when it stops. Short runs then look worse than they really are. That makes small amounts of data look less useful and pushes the answer toward bigger models. The authors set the schedule to match each run's length, and found this gives the best final loss.
The paper's Table 3 (Approach 1) gives the best token count for each model size:
| Model size | Best tokens | Tokens per parameter |
|---|---|---|
| 1 billion | 20.2 billion | about 20 |
| 10 billion | 205.1 billion | about 20 |
| 67 billion | 1.5 trillion | about 22 |
| 280 billion | 5.9 trillion | about 21 |
The paper does not state a single "20 tokens per parameter" rule. That number is my division of its table values and of Chinchilla's 1.4 trillion tokens by 70 billion parameters.
The paper's Table 1 shows the older models:
| Model | Parameters | Training tokens |
|---|---|---|
| GPT-3 | 175B | 300B |
| Jurassic | 178B | 300B |
| Gopher | 280B | 300B |
| MT-NLG | 530B | 270B |
| Chinchilla | 70B | 1.4T |
Gopher used about FLOPs. Chinchilla used the same budget with a model four times smaller and four times more data.
On MMLU, a test of 57 school and expert subjects, 5-shot (the model sees five examples first):
The abstract rounds Chinchilla's score to 67.5%, while the results section and Table 6 say 67.6%. Chinchilla also beat Gopher, GPT-3, Jurassic-1 and Megatron-Turing NLG on most of the tasks the paper tested.
What this shows. For these two models, the smaller, longer-trained one is better at equal cost. A smaller model is also cheaper to run afterwards, which the paper points out.
What this does not show. It does not prove the exact 20-to-1 ratio holds for every model, dataset or training recipe.