What we want to understand
Training a large model costs money before you know how good it will be. A scaling law is the tool that turns a few small, cheap runs into a prediction for a big one, and into a rule for dividing a fixed budget between a bigger model and more training text. You will meet its vocabulary in many later papers: compute-optimal, over-training, extrapolation. We will do the mathematics first, with invented numbers so that nothing is mistaken for a measurement, and then look at what the papers claim.

A power law with a floor
Let be the amount of data and the error. A common form of the law says
where is a floor that no amount of data removes, is a scale, and is the exponent: the second term shrinks as grows. On a plot with both axes logarithmic, a pure power law () is a straight line, because . The floor bends it.
Floor , scale , exponent . With the floor removed, is a straight line on logarithmic axes; the floor bends it.
Take an invented law with , and . Five cheap runs, at million tokens (in the formula counts tokens, so the first run has ), give
Now fit. First we allow a floor: we try values of from up to the smallest , and for each draw the least-squares line of against , keeping the whose line fits best. This recovers , and . Second, we fit a straight line in log-log space, which fixes : it gives the exponent and the scale .
Both fit the five points. Before reading on, ask what each predicts far outside them.
Check the extrapolation
Ask what a straight line in log-log space does as the data grows, and what the true law does.
A line with no floor keeps falling
A pure power law is a straight line on logarithmic axes and never stops falling, while the true law flattens at its floor. Outside the five runs the straight line therefore promises a lower loss than the true law. The table gives the numbers.
| (tokens) | the true law | the straight-line fit |
|---|---|---|
| 32 million | 2.8228 | 2.6912 |
| 1 billion | 2.0484 | 1.3788 |
| 100 billion | 1.7728 | 0.5635 |
Scroll horizontally to view columns.
Inside the range of the data the two agree to within about ( percent). Far outside it, the straight line promises an error of where the true law sits above its floor of . A fit is a claim about the shape of the curve, and a different shape fits the same five points. Noise makes this worse: a pattern of percent applied to the five values in turn moves the fitted floor from to and the prediction at billion tokens from to .
In the figure you can keep the first three, four or all five of the runs, add the small alternating noise, and choose whether you predict from the fit with a floor or the fit without one. Choose a number of tokens, from million up to billion, enter your prediction of the loss there, and then check it. The figure shows the value the fit gives, how far off you were, and both fitted curves. Its numbers come from the fitted model, so they differ a little from the true-law column above: at one billion tokens the fitted value is and the true law gives . With three runs and three unknowns the fit has no slack left. Pointing to a symbol, a run or a curve lights up what matches it, and changing any choice clears your earlier answer.
x is training tokens; E is the loss floor; A sets the scale; γ is the exponent; ŷ is the predicted loss.
Worked example
Solid blue: fitted floor. Dashed rust: floor fixed at zero. These compare two model choices; their gap is not a confidence interval.
| Observation | Training tokens x | Loss y |
|---|---|---|
| 1 | 1,000,000 | 5.34804 |
| 2 | 2,000,000 | 4.5821 |
| 3 | 4,000,000 | 3.97698 |
| 4 | 8,000,000 | 3.49891 |
| 5 | 16,000,000 | 3.12121 |
- Fitted floor
- E = 1.70035, A = 400.264, γ = 0.340054
- Floor fixed at zero
- E = 0, A = 77.2925, γ = 0.194291
| Training tokens | Fitted floor | Floor fixed at zero |
|---|---|---|
| 32,000,000 | 2.82286 | 2.69123 |
| 1 × 10⁹ | 2.04858 | 1.37884 |
| 1 × 10¹¹ | 1.77309 | 0.56355 |
The floor search compares squared residuals in candidate-specific log space over 2,000 floor values. This is a heuristic; it does not establish which model will generalize.
These are synthetic values, not measurements from training runs. Real training curves have noise, interacting factors and uncertain functional forms.
Now you try
Change one quantity, then predict before checking.
Your selected fit:
Solid blue: fitted floor. Dashed rust: floor fixed at zero. These compare two model choices; their gap is not a confidence interval.
| Observation | Training tokens x | Loss y |
|---|---|---|
| 1 | 1,000,000 | 5.34804 |
| 2 | 2,000,000 | 4.5821 |
| 3 | 4,000,000 | 3.97698 |
| 4 | 8,000,000 | 3.49891 |
| 5 | 16,000,000 | 3.12121 |
- Fitted floor
- E = 1.70035, A = 400.264, γ = 0.340054
- Floor fixed at zero
- E = 0, A = 77.2925, γ = 0.194291
Only the fitted range is drawn here. Save a prediction before extending the curves beyond it.
The floor search compares squared residuals in candidate-specific log space over 2,000 floor values. This is a heuristic; it does not establish which model will generalize.
Begin with the worked example, then change a quantity and predict.
The compute-optimal split
Now let the loss depend on two things, the number of parameters and the number of training tokens :
The budget is , a common approximation and an assumption of this toy. Spending on parameters leaves tokens, so the loss along the budget is
Set the derivative with respect to to zero: , which gives
So the best model size grows as a power of the budget, with exponent , and the tokens grow with the remaining exponent .
Best size: exponent on the budget. Best tokens: exponent . With equal exponents, both grow by the square root of the budget.
An example, with invented , , , and . The best split is parameters and tokens, which is tokens per parameter, with loss . Multiply the budget by and both and double: they grow in equal proportion. A model half the size, or twice the size, at the same budget costs percent more loss ( against ), so the optimum is flat.
Change the exponents. With and the exponent on is : multiplying the budget by multiplies by and by , so percent of the growth, on a logarithmic scale, goes to parameters. A different fitted exponent moves the whole allocation. That is the shape of the difference between two of the papers below, though this toy uses neither paper's constants and says nothing about why their fits differed. (With these constants and the unequal exponents the absolute sizes come out absurd, so only the ratios mean anything.)
In the figure you can move the budget from to , choose the model with equal exponents and or the one with and , and choose a model a quarter, a half, once, twice or four times the best size at the same budget. Say what you expect, whether the size, the tokens, the loss or the tokens per parameter, and then check. For the model with unequal exponents the figure shows only the growth ratios, because its sizes in absolute terms are absurd. Pointing to a term or a mark lights up what matches it, and changing any choice clears your earlier answer.
N is model parameters; D is training tokens; C is training compute in operations. E, A and B are fixed loss constants; α and β set the two rates of improvement. The asterisk in N∗ and D∗ denotes the minimum-loss allocation under the assumed budget; the plot shows it as a filled red dot. The size multiplier m sets the actual allocation: .
Worked example
Model B: α = β = 0.3. E = 1.5, A = 300, B = 500; all are invented.
| Quantity | Value |
|---|---|
| Parameters N | 1.74251 × 10⁹ |
| Training tokens D | 9.56472 × 10⁹ |
| Loss L | 2.51344 |
| Tokens per parameter | 5.48903 |
| Multiple of optimal N | Loss | Percent above minimum loss |
|---|---|---|
| 0.25 | 2.60236 | 3.53756 |
| 0.5 | 2.53543 | 0.874898 |
| 1 | 2.51344 | 0 |
| 2 | 2.53543 | 0.874898 |
| 4 | 2.60236 | 3.53756 |
The budget stays C = 6ND: increasing the parameter count leaves fewer training tokens.
These are synthetic values, not measurements from training runs. Real training curves have noise, interacting factors and uncertain functional forms. The toy omits inference cost and repeated data, and does not explain why historical studies differed.
Now you try
Change one quantity, then predict before checking.
Your selected constants:
Choose a compute budget and a model. The worked example above stays on the board while you make your prediction.
Begin with the worked example, then change a quantity and predict.
What the papers report
Hoffmann and colleagues (NeurIPS 2022, titled there "An empirical analysis of compute-optimal large language model training") trained over 400 models, from under 70 million to over 16 billion parameters, on 5 billion to over 400 billion tokens. They model the final loss as , the form we used, and conclude that parameters and training tokens should grow in equal proportion with compute: for every doubling of model size, the tokens should double. They report that Kaplan and colleagues (2020) recommended otherwise: for a larger budget, a model larger but only more tokens. (I know the earlier paper only through this report.) Their test was Chinchilla, 70 billion parameters trained on about four times the data of the 280 billion parameter Gopher at the same compute budget.
Sardana and colleagues (ICML 2024) point out that the Chinchilla laws leave out the cost of serving the model. Including expected inference demand, they find that researchers expecting reasonably large demand, about a billion requests, should train models smaller and longer than Chinchilla-optimal. They trained 47 models to check the formula and find quality still improving up to 10,000 tokens per parameter.
Muennighoff and colleagues (NeurIPS 2023) ask what happens when there is not enough new text. Across 400 training runs, up to 900 billion tokens and 9 billion parameters, they find that with a fixed compute budget, training with up to 4 epochs of repeated data changes the loss negligibly compared with unique data, and that with more repetition the value of added compute decays toward zero.
Gadre and colleagues (ICLR 2025) fit laws that extrapolate to over-training, meaning more tokens than compute-optimal. From a testbed of 104 models, they predict the validation loss of a 1.4 billion parameter, 900 billion token run, 32 times over-trained, and of a 6.9 billion parameter, 138 billion token run, each from experiments using less compute, and they relate perplexity to downstream error by a power law.
What is still open
Whether a law fitted on small runs holds far beyond them, which is the extrapolation problem we met on the line. Sardana and colleagues report an ablation bearing on this: laws developed only from data at typical tokens-per-parameter ratios overestimate the impact of additional tokens at extreme ratios. Gadre and colleagues' predictions are checked against runs they trained, within the ranges they report.
The compute-optimal rule is a starting point, not a verdict. The loss floor, repeated data and the cost of serving are why. The flat optimum we found in the toy, where a model half or twice the best size costs under one percent more loss, is a reminder that the exact split matters less than being in the right region.
Now you try
Say your answer before you look at the answers.
- With and a budget ten times larger, , by what factor do and each grow?
- Choose the model twice the optimal size at . Is the loss higher or lower than , and by roughly how much?
- The straight-line fit in the table gives at one billion tokens. Is the true loss higher or lower, and what does that say about trusting a fit outside its range?
Answers
Answers to the three exercises
- Both grow by , the square root of ten, because both exponents are one half; the loss falls to .
- Higher: , about percent more.
- Higher (). The line has no floor, so it keeps falling where the true curve flattens.
Sources
Hoffmann et al., NeurIPS 2022: abstract, introduction and Section 3.3 read in full text. Sardana et al., ICML 2024, Muennighoff et al., NeurIPS 2023 and Gadre et al., ICLR 2025: abstracts read. All numbers in the worked examples are invented for the arithmetic and can be checked with a calculator; none is a measurement. More guides are listed in the articles index.
A scaling law is a fitted curve. Chapter 1 shows what the model being fitted actually computes, and checks it against a real one.
