Parameters or tokens
Given a fixed amount of compute, should it buy a bigger model or more training data? Training a transformer with parameters on tokens costs about
floating-point operations: a forward pass is one multiply-add, 2 FLOPs, per parameter per token, and the backward pass twice that. Doubling the model at fixed halves the tokens it sees. Kaplan et al. (2020) concluded that most extra compute should go into size. Hoffmann et al. (2022) trained over 400 models and found that parameters and tokens should grow about equally. Their 70-billion-parameter Chinchilla, trained on 1.4 trillion tokens, beat the 280-billion-parameter Gopher trained with the same compute. This tab repeats their third method on a toy grid of its own.
The loss law
Hoffmann et al. model the final loss of a model with parameters trained on tokens as three terms:
is the loss no model of this kind can remove: the entropy of the text, as far as the model can see it. is what a finite model cannot fit however long it trains, and is what a finite number of tokens cannot teach however big the model. The One run, decomposed panel splits a run's loss into these three parts. For the width-256 model after 16.4M tokens, the fitted law gives 1.888 against a measured 1.877: a floor of 1.172, 0.177 for the model's size and 0.539 for the data. More tokens would help it more than more width.
The grid
The page trains models of widths 32, 64, 128, 192 and 256, each with 4 layers and 4 heads, from 1.67M to 16.08M parameters. Each is trained for 250, 500, 1,000 and 2,000 steps, which is 2.0M to 16.4M tokens. Two tricks keep this to minutes. Each width trains one constant-learning-rate trunk and branches a WSD decay off it for each length, as on the WSD tab, so a row costs one run plus four short decays; the width-256 row is that tab's trunk and decays. And the widths other than 256 use μP with base width 256, so the AdamW tab's peak learning rate, 4e-3, serves every width without a sweep per width.
Two rows went wrong. The trunks of widths 32 and 192 spiked near step 40 of the warmup, just as the loss left its early plateau: their gradient norms jumped to 54.9 and 35.1, where the other trunks never went above 6.9. At step 100 they were at 4.824 and 4.835 while the others had reached 3.984 or less, and they trail the trend for the whole run. Trained a second time, each spiked again at the same point. Scaling studies usually leave out runs that diverged or spiked. The page shows them but leaves them out of the fit by a stated rule: a trunk whose largest gradient norm is more than 5 times the median trunk's. That leaves 12 points from widths 64, 128 and 256.
Fitting it
Hoffmann et al.'s third approach fits the five numbers to every run at once. It writes the law in log space, with , and so that the three terms stay positive:
It then minimises the Huber loss between and the measured , squared for misfits below and linear above, with L-BFGS from a grid of starting points. The Huber loss keeps one odd run from dragging the fit. Here the fit gives , and , and no fitted point is off by more than 0.070.
How sure is the fit? The The fit panel refits it to 200 bootstrap resamples of the points, and the 10–90 % ranges are wide: α from 0.66 to 0.94, β from 0.47 to 0.74. With spanning less than a factor of 5, and can trade against each other with little change in the predicted losses. Besiroglu et al. (2024) refitted Hoffmann et al.'s own data the same way and found its confidence intervals implausibly narrow, and a slightly different law.
Compute-optimal models
With the law fitted, the best model for a budget is the that minimises . Setting the derivative to zero gives a closed form:
If both exponents are , so parameters and tokens grow together. The Iso-FLOP curves panel draws at fixed budgets, each a valley with its best size at the bottom, and the Compute-optimal frontier joins those bottoms. Here , bootstrap range 0.37 to 0.51, close to the 0.45 that Hoffmann et al.'s fit gives. In the middle of the grid's compute, FLOPs, the best split is 2.83M parameters on 10.6M tokens: 3.75 tokens per parameter, not Chinchilla's famous 20.
A toy, not Chinchilla
These are toy numbers, and the page says so. The models are a few million parameters, each run takes minutes, and the 12 fitted runs span a factor of 4.7 in and 8 in , where real studies train hundreds of models over several decades. Most of here is the token embedding: 97 % of the width-32 model and 80 % of the width-256 one. Kaplan et al. left the embedding out of and Hoffmann et al. kept it in, and at this size that choice alone moves the exponents. Porian et al. (2024) traced most of the disagreement between those two papers to such details: how the last layer's compute is counted, the length of the warmup, and optimiser settings tuned to each model size. That the compute exponent lands near Chinchilla's is a coincidence of this grid, not a replication.
Where it came from
Kaplan et al. (2020) first measured power laws in , and for language models, and Hoffmann et al. (2022) revised the compute-optimal split with three methods that agreed. Besiroglu et al. (2024) replicated the third, and Porian et al. (2024) reconciled the two papers. Hägele et al. (2024) showed that WSD decays branched off one trunk give scaling laws as good as separate cosine runs, which is how this grid is trained. The models are trained on TinyStories (Eldan and Li, 2023). The WSD and μP tabs explain the two tricks, and Perplexity in the Evals Explainer reads a loss as a perplexity.
Papers
- Training Compute-Optimal Large Language Models Fits L(N, D) = E + A/N^α + B/D^β to over 400 runs and concludes that parameters and tokens should grow together; this tab fits the same law the same way.
- Scaling Laws for Neural Language Models The earlier power laws in parameters, data and compute, whose allocation favoured larger models trained on fewer tokens.
- Chinchilla Scaling: A replication attempt Refits Hoffmann et al.'s third approach from their published points and finds different parameters, with bootstrap intervals like this tab's.
- Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations Uses cooldowns branched off one constant-learning-rate run to measure a scaling grid's token counts at the cost of one run per model size, as this tab does.
- Resolving Discrepancies in Compute-Optimal Scaling of Language Models Traces the gap between Kaplan's and Hoffmann's allocations to how parameters are counted, warmup and per-size tuning.
- TinyStories: How Small Can Language Models Be and Still Speak Coherent English? The synthetic children's stories every model of this explainer is trained on.