Contents

Foundation Model Engineering

Manuscript updated (UTC) · Chapter source on GitHub · Cite this chapter (RIS)

On this page

1.4 The Bitter Lesson

Suppose a chess program has twice as long to choose a move. An extra second buys a deeper search if the program can use it to examine more positions. A fixed list of rules gives the same answer however long you wait. Richard Sutton used computer chess, Go and speech recognition to ask which parts of an AI system keep improving as computation becomes cheaper. His 2019 essay called this pattern The Bitter Lesson. [1]

Where does an extra second go?

Search spends computation on a particular decision. In a game, the program can consider the opponent’s replies to a candidate move. Learning spends computation changing what the system will do on future decisions. A language model can process more training examples, compare its predictions with the next tokens, and update its weights. The two can work together. A learned evaluation of a board position can guide the search toward promising moves. [1]

Sutton’s observation leaves engineers with a practical question. If extra computation is available, which part of the system will turn it into a better result? For a language model, even the phrase “scale up training” leaves a choice open. A larger model costs more per token, so a fixed budget buys fewer tokens.

How did Chinchilla spend Gopher’s budget?

Hoffmann and colleagues asked whether they could use Gopher’s training compute more effectively. Their 2022 paper reports two quite different allocations. Read the model-size bars first, then follow the same model into the token panel. [3]

Parameters (billions)
Gopher
280
Chinchilla
70
Training tokens (billions)
Gopher
300
Chinchilla
1,400
Within each panel the two bars share a scale. Values from Table 1 of Hoffmann et al. (2022). [3]

Chinchilla had one quarter as many parameters and saw about 4.7 times as many tokens. On the paper’s five-shot MMLU evaluation across 57 tasks, Table 6 reports 60.0% average accuracy for Gopher and 67.6% for Chinchilla. The team also changed details of training, including the data sampling proportions. The comparison gives a reason to test a smaller model trained for longer. The 7.6-point difference cannot isolate the effect of token count alone. [3]

Scaling studies fit held-out token loss to measurements from a family of runs. Kaplan et al. observed power-law trends over the range they studied. One form used by Hoffmann et al. is

L(N,D)=L∞+ANα+BDβ,C≈6ND.L(N,D)=L_\infty+\frac{A}{N^\alpha}+\frac{B}{D^\beta},\qquad C\approx6ND.

Here NN counts parameters, DD counts training tokens, LL is the predicted held-out loss, and L∞L_\infty is the fitted loss floor. The positive coefficients A,BA,B and exponents α,β\alpha,\beta come from fitting the runs. CC approximates training FLOPs for a dense Transformer when parameter matrix multiplications dominate. Multiplying the rounded counts in the figure gives different 6ND6ND estimates even though the authors report the same training compute. The approximation leaves out costs such as attention across token positions. [2] [3]

Try three allocations with the same budget

The following Python example uses dimensionless model and data sizes and the same illustrative curve as the controls below. Its coefficients were chosen for teaching. With a budget of ND=100ND=100, what happens if you double model size from 10 to 20?

budget = 100
for model_size in (5, 10, 20):
    tokens = budget / model_size
    loss = 0.5 + model_size ** -0.3 + tokens ** -0.3
    print(f"N={model_size:2d}  D={tokens:4.1f}  L={loss:.3f}")

The three predicted losses are 1.524, 1.502, and 1.524. Doubling NN halves DD. The two outer allocations tie because swapping NN and DD in this particular formula leaves the sum unchanged. With measured coefficients and exponents, the minimum can move away from N=DN=D.

Change the budget or change the split

Same compute, different allocation

A synthetic dimensionless curve: L = 0.5 + N⁻⁰·³ + D⁻⁰·³. Hold ND fixed and change model size versus data. This does not predict real-model performance or emerging abilities.

Model size N
10.00
Data size D
10.00
Illustrative loss L
1.502

This symmetric curve is minimized at N=D. Real optimal ratios depend on fitted coefficients and exponents, data quality, architecture and inference cost. A larger budget can still be allocated poorly.

To choose an allocation for a real run, compare several model sizes at roughly equal training FLOPs. Evaluate on the same held-out tokens with the same tokenizer, then check the downstream task you care about. Chapter 8.2 develops the allocation calculation. Chapter 2.1 takes up a different constraint on language models: how much of the preceding sequence a prediction can use.

Quizzes

Quiz 1: A chess program searches twice as many positions. How would you test whether it chooses better moves? Give the two search budgets the same set of positions and the same evaluation function. Compare move quality against a reference or play paired games with colors reversed. Counting extra positions measures work, not its benefit.

Quiz 2: Why does the teaching curve give the same loss for (5, 20) and (20, 5)? It uses the same coefficient and exponent for both terms. Swapping the inputs therefore preserves the sum. Fixed compute alone does not imply this symmetry.

Quiz 3: Can the MMLU difference between Gopher and Chinchilla tell you exactly how much an extra trillion tokens would help Gopher? The runs differ in parameter count, token count and training details. To estimate that effect for Gopher, hold its model, data distribution and evaluation protocol fixed and vary the number of training tokens.

Quiz 4: Where does the factor of six in the dense-training approximation come from? In the leading matrix multiplications, multiplying and adding cost about two FLOPs per parameter per token in the forward pass. Computing weight and input gradients adds about four. Attention over positions and operations such as activation recomputation can change the total.

References

  1. Sutton, R. (2019). The Bitter Lesson.
  2. Kaplan, J., et al. (2020). Scaling Laws for Neural Language Models.
  3. Hoffmann, J., et al. (2022). Training Compute-Optimal Large Language Models, Tables 1 and 6 and Section 4.1.