Skip to content
Foundations2026-11-0712 min read

Scaling Laws Explained With a Fitted Power Law

A scaling law turns a few cheap runs into a prediction for an expensive one. Fit a power law with a floor, then see where the fitted line stops being reliable.

Key takeaways

  • A power law without a floor is a straight line in log-log space; a fit with the floor can match the same five runs and predict a very different far future.
  • With loss E + A/N^alpha + B/D^beta and budget 6ND, the best model size grows as a power of the budget with exponent beta over alpha plus beta.
  • Near the optimum the loss is flat, and a fitted law is only a claim about the shape of the curve inside the runs that produced it.

Rod Rivera

Author

Scaling Laws Explained With a Fitted Power Law

Rod's note: read with a pencil; the margins are for you.

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.

Chalkboard cover with the title of the article.

A power law with a floor

Let xx be the amount of data and yy the error. A common form of the law says

y  =  E  +  A x−γ,y \;=\; E \;+\; A\,x^{-\gamma},

where EE is a floor that no amount of data removes, AA is a scale, and γ>0\gamma > 0 is the exponent: the second term shrinks as xx grows. On a plot with both axes logarithmic, a pure power law (E=0E = 0) is a straight line, because log⁡y=log⁡A−γlog⁡x\log y = \log A - \gamma \log x. The floor bends it.

Reading the law

Floor EE, scale AA, exponent γ\gamma. With the floor removed, log⁡y=log⁡A−γlog⁡x\log y = \log A - \gamma \log x is a straight line on logarithmic axes; the floor bends it.

Take an invented law with E=1.7E = 1.7, A=400A = 400 and γ=0.34\gamma = 0.34. Five cheap runs, at x=1, 2, 4, 8, 16x = 1,\ 2,\ 4,\ 8,\ 16 million tokens (in the formula xx counts tokens, so the first run has x=106x = 10^{6}), give

y=5.3480,  4.5821,  3.9770,  3.4989,  3.1212.y = 5.3480,\ \ 4.5821,\ \ 3.9770,\ \ 3.4989,\ \ 3.1212.

Now fit. First we allow a floor: we try 2,000{}2{,}000 values of EE from 0{}0 up to the smallest yy, and for each draw the least-squares line of log⁡(y−E)\log(y - E) against log⁡x\log x, keeping the EE whose line fits best. This recovers E≈1.70E \approx 1.70, A≈400A \approx 400 and γ≈0.340\gamma \approx 0.340. Second, we fit a straight line in log-log space, which fixes E=0E = 0: it gives the exponent 0.1943{}0.1943 and the scale 77.29{}77.29.

Both fit the five points. Before reading on, ask what each predicts far outside them.

Check the extrapolation

Quick check — Both fits match the five runs. At one billion tokens, far outside them, will the straight-line fit (no floor) predict a loss higher than, about the same as, or lower than the true law?
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.

xx (tokens)the true lawthe straight-line fit
32 million2.82282.6912
1 billion2.04841.3788
100 billion1.77280.5635

Inside the range of the data the two agree to within about 0.07{}0.07 (1.4{}1.4 percent). Far outside it, the straight line promises an error of 0.56{}0.56 where the true law sits above its floor of 1.7{}1.7. 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 +1, −1, +1, −1, +1+1,\ -1,\ +1,\ -1,\ +1 percent applied to the five values in turn moves the fitted floor from 1.70{}1.70 to 1.85{}1.85 and the prediction at 100{}100 billion tokens from 1.77{}1.77 to 1.90{}1.90.

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 32{}32 million up to 100{}100 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 2.0486{}2.0486 and the true law gives 2.0484{}2.0484. 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.

y^(x)=E+Ax−γ

x is training tokens; E is the loss floor; A sets the scale; γ is the exponent; ŷ is the predicted loss.

Worked exampleLoss y (log scale)1 million1 × 10¹¹Training tokens (log scale)0.1110Chosen token count, fitted floor: 2.04858Chosen token count, floor fixed at zero: 1.37884Observation 1: 1,000,000 tokens, loss 5.34804Observation 2: 2,000,000 tokens, loss 4.5821Observation 3: 4,000,000 tokens, loss 3.97698Observation 4: 8,000,000 tokens, loss 3.49891Observation 5: 16,000,000 tokens, loss 3.12121

Solid blue: fitted floor. Dashed rust: floor fixed at zero. These compare two model choices; their gap is not a confidence interval.

Synthetic observations used in this fit
ObservationTraining tokens xLoss y
11,000,0005.34804
22,000,0004.5821
34,000,0003.97698
48,000,0003.49891
516,000,0003.12121
Fitted floor
E = 1.70035, A = 400.264, γ = 0.340054
Floor fixed at zero
E = 0, A = 77.2925, γ = 0.194291
Worked extrapolations beyond the fitted range
Training tokensFitted floorFloor fixed at zero
32,000,0002.822862.69123
1 × 10⁹2.048581.37884
1 × 10¹¹1.773090.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.

Choose the question

Your selected fit:

E=1.70035,A=400.264,γ=0.340054
Loss y (log scale)1 million16,000,000Training tokens (log scale)2.43.96.5Observation 1: 1,000,000 tokens, loss 5.34804Observation 2: 2,000,000 tokens, loss 4.5821Observation 3: 4,000,000 tokens, loss 3.97698Observation 4: 8,000,000 tokens, loss 3.49891Observation 5: 16,000,000 tokens, loss 3.12121

Solid blue: fitted floor. Dashed rust: floor fixed at zero. These compare two model choices; their gap is not a confidence interval.

Synthetic observations used in this fit
ObservationTraining tokens xLoss y
11,000,0005.34804
22,000,0004.5821
34,000,0003.97698
48,000,0003.49891
516,000,0003.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.

Your prediction

Begin with the worked example, then change a quantity and predict.

This is a synthetic example with invented generating constants. Calculated values are shown to at most six significant digits.

The compute-optimal split

Now let the loss depend on two things, the number of parameters NN and the number of training tokens DD:

L(N,D)  =  E+ANα+BDβ.L(N, D) \;=\; E + \frac{A}{N^{\alpha}} + \frac{B}{D^{\beta}}.

The budget is C=6NDC = 6ND, a common approximation and an assumption of this toy. Spending CC on NN parameters leaves D=C/(6N)D = C/(6N) tokens, so the loss along the budget is

L(N)  =  E+AN−α+B(C6)−βNβ.L(N) \;=\; E + A N^{-\alpha} + B \left(\frac{C}{6}\right)^{-\beta} N^{\beta}.

Set the derivative with respect to NN to zero: −αAN−α−1+βB(C/6)−βNβ−1=0-\alpha A N^{-\alpha-1} + \beta B (C/6)^{-\beta} N^{\beta - 1} = 0, which gives

N∗  =  (αAβB)1/(α+β)(C6)β/(α+β).N^{*} \;=\; \left(\frac{\alpha A}{\beta B}\right)^{1/(\alpha+\beta)} \left(\frac{C}{6}\right)^{\beta/(\alpha+\beta)}.

So the best model size grows as a power of the budget, with exponent β/(α+β)\beta/(\alpha+\beta), and the tokens grow with the remaining exponent α/(α+β)\alpha/(\alpha+\beta).

Where the budget goes

Best size: exponent β/(α+β)\beta/(\alpha+\beta) on the budget. Best tokens: exponent α/(α+β)\alpha/(\alpha+\beta). With equal exponents, both grow by the square root of the budget.

An example, with invented α=β=0.3\alpha = \beta = 0.3, A=300A = 300, B=500B = 500, E=1.5E = 1.5 and C=1020C = 10^{20}. The best split is N∗=1.743×109N^{*} = 1.743 \times 10^{9} parameters and D∗=9.565×109D^{*} = 9.565 \times 10^{9} tokens, which is 5.49{}5.49 tokens per parameter, with loss 2.5134{}2.5134. Multiply the budget by 4{}4 and both N∗N^{*} and D∗D^{*} double: they grow in equal proportion. A model half the size, or twice the size, at the same budget costs 0.87{}0.87 percent more loss (2.5354{}2.5354 against 2.5134{}2.5134), so the optimum is flat.

Change the exponents. With α=0.15\alpha = 0.15 and β=0.35\beta = 0.35 the exponent on NN is 0.7{}0.7: multiplying the budget by 4{}4 multiplies N∗N^{*} by 40.7=2.639{}4^{0.7} = 2.639 and D∗D^{*} by 40.3=1.516{}4^{0.3} = 1.516, so 70{}70 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 CC from 1018{}10^{18} to 1024{}10^{24}, choose the model with equal exponents 0.3{}0.3 and 0.3{}0.3 or the one with 0.15{}0.15 and 0.35{}0.35, 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.

L=E+ANα+BDβ,C=6NDN∗=(αAβB)1α+β(C6)βα+β,D∗=C6N∗

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: N=mN∗,D=D∗m.

Worked exampleLoss¼×½×1×2×4×2.462.65Model size / optimal size0.25 times optimal size; loss 2.602360.5 times optimal size; loss 2.535431 times optimal size; loss 2.513442 times optimal size; loss 2.535434 times optimal size; loss 2.60236

Model B: α = β = 0.3. E = 1.5, A = 300, B = 500; all are invented.

Selected allocation
QuantityValue
Parameters N1.74251 × 10⁹
Training tokens D9.56472 × 10⁹
Loss L2.51344
Tokens per parameter5.48903
Move model size at the same compute budget
Multiple of optimal NLossPercent above minimum loss
0.252.602363.53756
0.52.535430.874898
12.513440
22.535430.874898
42.602363.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.

Choose the question

Your selected constants:

E=1.5,A=300,B=500,α=0.3,β=0.3,m=1,C=1 × 10²⁰

Choose a compute budget and a model. The worked example above stays on the board while you make your prediction.

Your prediction

Begin with the worked example, then change a quantity and predict.

This is a synthetic example with invented generating constants. Calculated values are shown to at most six significant digits.

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 L(N,D)=E+A/Nα+B/DβL(N, D) = E + A/N^{\alpha} + B/D^{\beta}, 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 10×{}10 \times larger budget, a model 5.5×{}5.5 \times larger but only 1.8×{}1.8 \times 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 300×{}300 \times 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.

  1. With α=β=0.3\alpha = \beta = 0.3 and a budget ten times larger, C=1021C = 10^{21}, by what factor do N∗N^{*} and D∗D^{*} each grow?
  2. Choose the model twice the optimal size at C=1020C = 10^{20}. Is the loss higher or lower than 2.5134{}2.5134, and by roughly how much?
  3. The straight-line fit in the table gives 1.3788{}1.3788 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
  1. Both grow by 3.1623{}3.1623, the square root of ten, because both exponents are one half; the loss falls to 2.2175{}2.2175.
  2. Higher: 2.5354{}2.5354, about 0.87{}0.87 percent more.
  3. Higher (2.0484{}2.0484). 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.

Read Chapter 1: what a model call computes

A scaling law is a fitted curve. Chapter 1 shows what the model being fitted actually computes, and checks it against a real one.

Learn the mechanism. Test the claim.

Join the Prof Rod newsletter for one educational lesson a week, with worked examples attached. It is free to register for and separate from the Zero Employee community.