Scaling laws: Kaplan and Chinchilla
Read Kaplan et al.'s power-law fits (loss vs parameters and tokens), then Chinchilla's correction: for a fixed compute budget, model size and token count should scale equally.
Scaling a language model -- making it larger, training it longer -- predictably improves performance. Scaling laws quantify this relationship as empirical power laws, allowing practitioners to forecast model quality before committing to an expensive training run.
Kaplan et al. (2020): OpenAI scaling laws
Kaplan et al. trained hundreds of models varying three quantities[1]:
- : number of non-embedding parameters.
- : number of training tokens.
- : training compute (FLOPs), approximately .
Finding 1: power-law relationship between loss and each variable (holding the others constant and large enough):
where and are fitted constants. Cross-entropy loss on the test set decreases smoothly and predictably as a power law in either or .
Finding 2: for a fixed compute budget , model size should dominate. Kaplan et al. found that for a given , you should use the largest model that can be trained in the given compute budget (even if it means training for fewer tokens). This led to GPT-3 (175B parameters, 300B tokens) and the trend of training large models for relatively few tokens[2].
Chinchilla (Hoffmann et al., 2022)
Kaplan et al.'s recommendation turned out to be wrong. Hoffmann et al. ran a more careful analysis with better-controlled experiments and found a different optimal allocation[3].
IsoFLOP analysis: for a fixed compute budget , vary and set accordingly. Find the that minimizes final loss.
Finding: the optimal allocation satisfies:
i.e., model size and token count should scale equally. Doubling compute should be split equally between doubling and doubling .
The Chinchilla rule of thumb: for a compute-optimal run, train on approximately tokens. For a 70B parameter model: tokens.
Run the FLOP count on real models to calibrate what these budgets cost:
- GPT-3 (, ): FLOPs.
- Chinchilla (, ): FLOPs. Fewer parameters than GPT-3, more compute, and a lower final loss, the result that overturned the Kaplan allocation.
- LLaMA-3 70B (, ): FLOPs, about the compute of the Chinchilla-optimal 70B run that reaches a similar loss.
The GPT-3 vs Chinchilla pair is the lesson in one comparison: at roughly the same compute budget, moving parameters into tokens ( to ) lowered the loss. The LLaMA-3 figure is the deliberate overshoot below.
Chinchilla-optimal models
| Model | (tokens) | ||
|---|---|---|---|
| GPT-3 | 175B | 300B | 1.7x (undertrained) |
| Chinchilla | 70B | 1.4T | 20x (optimal) |
| LLaMA-2 70B | 70B | 2T | 28x (overtrained) |
| LLaMA-3 70B | 70B | 15T | 214x (heavily overtrained) |
LLaMA-2 and LLaMA-3 are deliberately overtrained: the compute budget is allocated toward more tokens at the cost of suboptimal compute efficiency. The reason: inference is expensive in deployment. A smaller, overtrained model is cheaper to serve than a larger, compute-optimal model with the same final loss.
"Compute-optimal" is optimal only for a one-shot training run. If you will run the model for millions of inferences, the optimal allocation shifts: train smaller models longer.
Emergent abilities and phase transitions
A separate empirical finding: certain capabilities (multi-step arithmetic, code generation, multi-hop reasoning) appear abruptly at certain scale thresholds rather than improving gradually. This is called emergence.
The origin is contested:
- Measurement artifact (Wei et al.): metrics with step functions (right/wrong) show phase transitions; smooth metrics show gradual improvement throughout.
- Genuine phase transition: the model qualitatively changes its algorithm for certain tasks at a threshold parameter count.
The implication for practitioners: do not assume smooth performance scaling for all metrics. Some capabilities may be present-or-absent at given scales.
Scaling laws for fine-tuning and alignment
Scaling laws for pretraining don't directly apply to fine-tuning:
- SFT quality saturates faster with data size than pretraining.
- RLHF reward signal quality matters more than quantity.
- Instruction following improves with model scale, but safety and alignment properties don't follow the same power laws.
The practical lesson: spend most of the compute budget on pretraining (where scaling laws give predictable returns), then fine-tune efficiently with smaller datasets.
Exercises
Exercise 1. Using the Chinchilla rule of thumb and the FLOP count , find the compute-optimal token count and total training FLOPs for a -parameter model.
Solution
Step 1. Apply the rule of thumb: tokens.
Step 2. Substitute into with and :
So a compute-optimal model trains on about tokens for roughly FLOPs.
Exercise 2. A team has a fixed compute budget FLOPs and wants the Chinchilla-optimal allocation. Using and , solve for and . Then compare the final loss qualitatively against spending the same budget on a model in the Kaplan style.
Solution
Step 1. Substitute into : , so
Step 2. Then tokens, the Chinchilla 70B/1.4T point, as expected since matches that run.
Step 3. Compare allocations. A model at the same budget has tokens, only , far below the optimal . It is undertrained, so its final loss is higher than the allocation. This is the GPT-3 vs Chinchilla result: at fixed compute, moving budget from parameters into tokens lowers the loss.
Exercise 3. "Compute-optimal" minimizes loss for a single training run. Argue when a team should deliberately overtrain (the LLaMA-2/3 choice), and quantify the trade-off using the LLaMA-3 70B figure of versus the optimal .
Solution
Step 1. State what compute-optimal ignores. The Chinchilla optimum counts only training FLOPs. It does not count inference, which for a deployed model is paid per request across potentially billions of calls.
Step 2. Reframe the objective. The relevant cost is training plus lifetime inference. A smaller model with the same final loss is cheaper to serve (fewer FLOPs per token at inference), so for a heavily-served model it pays to reach that loss with fewer parameters, even at a worse training-compute efficiency.
Step 3. Quantify. LLaMA-3 70B trains on tokens per parameter versus the optimal , about more tokens (and roughly the training compute of the Chinchilla-optimal 70B run reaching a similar loss). The team spends that extra training compute once to keep the parameter count at rather than growing the model, trading a one-time training overspend for a permanently cheaper inference cost. The break-even favors overtraining precisely when expected inference volume is large.
The scaling-laws view sets the model size and token budget; the next stage is turning that pretrained base into an instruction follower through supervised fine-tuning.
References
- [1]Kaplan, J., et al. (2020). "Scaling laws for neural language models". arXiv:2001.08361. The original power-law fits for loss versus parameters, data, and compute.↩
- [2]Brown, T., et al. (2020). "Language models are few-shot learners (GPT-3)". NeurIPS. arXiv:2005.14165. The 175B-parameter, 300B-token model that followed the Kaplan allocation.↩
- [3]Hoffmann, J., et al. (2022). "Training compute-optimal large language models (Chinchilla)". NeurIPS. arXiv:2203.15556. The IsoFLOP analysis giving the equal-scaling rule and the 20-tokens-per-parameter heuristic.↩