Search

Search papers and lessons

Neural Scaling Laws

Level 4 · 9 min read

Neural scaling laws are power laws that predict how a language model's loss falls as you add parameters, training data or compute, over many orders of magnitude.

On this page

  • Colour = topic mix
  • Probability
  • Calculus
  • Discrete math
  • Losses & regularization
  • Pre-training
  • Neural network basics
  • Sign in to see your progress

TL;DR

A neural scaling law is a power law that predicts how a model's test loss falls as you make it bigger, train it on more data, or spend more compute. Across many orders of magnitude, the curve on a log-log plot is close to a straight line, so a few small training runs can predict the loss of a much larger one.

The laws matter because they turn "how big should the model be?" into a measurable curve rather than a guess. They tell a team how much a 10 times larger budget is likely to buy before the money is spent.

Where you'll see it: in choosing the size of a language model before a costly training run, in deciding how many tokens to train on, and in the planning documents that set compute budgets for large models.

Intuition

Doubling is not free, and it is not hopeless

Suppose you train a language model and measure its loss, the average cross-entropy on text it has not seen. You then train a model ten times larger on the same kind of data. The loss goes down, but by how much? A common hope is that it drops quickly at first and then flattens out. The scaling-law picture is more regular: the loss keeps falling, and each further factor of ten buys a fixed percentage off the loss.

That regularity is what a Power Law looks like. If LL is the loss and NN is the parameter count, a power law says L=c⋅N−αL = c \cdot N^{-\alpha} for constants cc and α\alpha. Multiply NN by ten and LL is multiplied by the same factor 10−α10^{-\alpha}, whatever value NN started at. The curve on a log-log plot is a straight line, and the slope is −α-\alpha.

Why a straight line is useful

If the relationship really is a straight line on log-log axes, you do not need to train the big model to know roughly where it will land. Train several small models, fit the line through their losses, and extend it. This is the same trick as extrapolating a trend in any field, and the reason it works is that the scaling exponents stayed stable over a wide range of model sizes in the reported experiments.

66.577.588.599.51000.20.40.6log10 of parameter countlog10 of test loss
  • fitted line, slope -0.102
Both axes are logarithmic, so the power law is a straight line. The two points are losses 4.0 and 2.5 at 10^6 and 10^8 parameters; extending the line predicts the loss at 10^10 without training that model.

The math

Definition: Neural scaling law
An empirical relationship of the form L(X)≈(XcX)αXL(X) \approx \left(\dfrac{X_c}{X}\right)^{\alpha_X}, where XX is a resource such as parameter count NN, dataset size DD (tokens) or compute CC, XcX_c is a constant with the same units, and αX>0\alpha_X > 0 is the scaling exponent for that resource.

One resource at a time

Kaplan and colleagues measured three separate laws, each with the other resources held large enough not to bind. For parameters, with the dataset large and training run to convergence,

L(N)≈(NcN)αN,αN≈0.076.L(N) \approx \left(\frac{N_c}{N}\right)^{\alpha_N}, \qquad \alpha_N \approx 0.076.

For dataset size, with a large model trained until it stops improving,

L(D)≈(DcD)αD,αD≈0.095.L(D) \approx \left(\frac{D_c}{D}\right)^{\alpha_D}, \qquad \alpha_D \approx 0.095.

Here NcN_c and DcD_c are fitted constants. The exponents are small, so improvements are gradual but steady. The exact values depend on the data, the architecture and the optimiser, so treat them as the fitted values from that study, not universal constants.

Balancing parameters and data

When both the model and the data are limited, the loss depends on both. One simple form that captures this is

L(N,D)≈[(NcN)αN/αD+DcD]αD.L(N, D) \approx \left[\left(\frac{N_c}{N}\right)^{\alpha_N/\alpha_D} + \frac{D_c}{D}\right]^{\alpha_D}.

Read it as a bottleneck. The larger term limits you. Making the model much bigger does nothing once DD is the bottleneck, and vice versa. This is the main reason the question "how big?" always comes with "how much data?".

Compute

Training compute scales roughly as C≈6NDC \approx 6 N D floating-point operations for a dense Transformer, with NN parameters and DD training tokens. The factor of 6 counts about two operations per parameter for the forward pass and about four for the backward pass per token. Because CC is the product of NN and DD, a fixed budget forces a trade-off between them, and the loss curve as a function of CC is also a power law. Compute-optimal training is the question of how to split that budget.

Worked examples

Example
Ten times the parameters, same data

Take αN=0.076\alpha_N = 0.076. A 10-fold increase in parameters multiplies the loss by 10−0.07610^{-0.076}.

  1. Compute the factor: 10−0.076=e−0.076×2.3026=e−0.1750≈0.84010^{-0.076} = e^{-0.076 \times 2.3026} = e^{-0.1750} \approx 0.840.
  2. Apply it once: a 10 times larger model has 0.8400.840 times the loss.
  3. Apply it twice: a 100 times larger model has 0.8402≈0.7060.840^2 \approx 0.706 times the loss. Check with the exponent directly, 10−0.152≈0.70510^{-0.152} \approx 0.705.

Interpretation: each factor of ten in parameters removes about 16 percent of the loss, and the savings do not shrink as you go up. Whether that is worth the cost depends on what a lower loss is worth to you, which is a separate question from the law itself.

Example
Predicting a larger model from two small ones

Two trained models have losses 4.04.0 at N=106N = 10^6 parameters and 2.52.5 at N=108N = 10^8.

  1. Slope in log-log space. log⁡102.5−log⁡104.0log⁡10108−log⁡10106=0.398−0.6028−6=−0.2042=−0.102\dfrac{\log_{10} 2.5 - \log_{10} 4.0}{\log_{10} 10^8 - \log_{10} 10^6} = \dfrac{0.398 - 0.602}{8 - 6} = \dfrac{-0.204}{2} = -0.102. So α≈0.102\alpha \approx 0.102.
  2. Fit the line. Loss at NN is L(N)=4.0×(N/106)−0.102L(N) = 4.0 \times (N / 10^6)^{-0.102}. Check at 10810^8: 4.0×100−0.102=4.0×10−0.204≈2.504.0 \times 100^{-0.102} = 4.0 \times 10^{-0.204} \approx 2.50, as measured.
  3. Extrapolate to N=1010N = 10^{10}. The ratio to 10610^6 is 10410^4, so L=4.0×104×(−0.102)=4.0×10−0.408≈4.0×0.391≈1.56L = 4.0 \times 10^{4 \times (-0.102)} = 4.0 \times 10^{-0.408} \approx 4.0 \times 0.391 \approx 1.56.

Interpretation: the prediction says a model with 101010^{10} parameters should reach a loss near 1.561.56. That is an extrapolation over two more orders of magnitude, so its error bars widen with distance from the measured range. The method is only as good as the assumption that the same line holds.

Example
Which bottleneck binds?

Use the joint form with αN/αD=0.076/0.095=0.8\alpha_N/\alpha_D = 0.076/0.095 = 0.8 and αD=0.095\alpha_D = 0.095. The constants NcN_c and DcD_c are not given here, so suppose a run where the two terms have the illustrative values (Nc/N)0.8=0.05(N_c/N)^{0.8} = 0.05 and Dc/D=0.5D_c/D = 0.5. The data term is ten times larger, so data is the bottleneck.

  1. Baseline: the bracket is 0.05+0.5=0.550.05 + 0.5 = 0.55, so L∝0.550.095=e0.095ln⁡0.55=e−0.0568≈0.945L \propto 0.55^{0.095} = e^{0.095 \ln 0.55} = e^{-0.0568} \approx 0.945.
  2. Ten times the parameters: the model term shrinks by 10−0.8≈0.15810^{-0.8} \approx 0.158, from 0.050.05 to 0.00790.0079. The bracket is 0.50790.5079 and L∝0.50790.095≈0.938L \propto 0.5079^{0.095} \approx 0.938.
  3. Ten times the data instead: the data term becomes 0.050.05. The bracket is 0.100.10 and L∝0.100.095≈0.804L \propto 0.10^{0.095} \approx 0.804.

Interpretation: ten times more parameters lowers the loss by under 1 percent, while ten times more data lowers it by about 15 percent. When one resource is the bottleneck, spending on the other is nearly wasted.

Tradeoffs and failure modes

Scaling laws are a planning tool, not a guarantee. They describe average test loss on a fixed data distribution, so they say little about specific abilities that can appear suddenly, and they are fitted over a limited range of scales.

SituationWhat goes wrongBetter choice
Extrapolating far past the measured rangeThe line may bend, and a small error in the slope is amplifiedMeasure at more scales and widen the error bars with distance
Optimising only the lossDownstream task quality can improve differently from lossTrack task metrics alongside loss, not instead of it
Fixing the dataset and growing only the modelThe data term becomes the bottleneck, so extra parameters buy littleGrow data together with parameters, using the joint form
Reusing exponents from one architecture or data mixThe constants and exponents depend on setupRefit on a small pilot run with your own data and architecture
Ignoring the cost of data qualityA law fitted on one corpus can overstate gains on a noisier oneKeep data quality fixed across the scales you compare

History

Jared Kaplan and colleagues at OpenAI published the first systematic study of these laws for language models in 2020, measuring how loss depended on parameters, data and compute over several orders of magnitude. Earlier work had reported power-law learning curves in machine learning, but the 2020 study made the picture precise for transformers and turned it into a planning method. In 2022 a team at DeepMind led by Jordan Hoffmann re-examined how to split a fixed compute budget between model size and tokens. They argued that many large models had been trained on too few tokens for their size, and their results shifted practice toward training smaller models on more data. The idea caught on because it replaced guesses about model size with a curve that could be measured in advance.

Check yourself

QuestionIn a power law L=c⋅N−αL = c \cdot N^{-\alpha}, what happens to LL when NN is multiplied by 10?Show answer

LL is multiplied by 10−α10^{-\alpha}. The factor depends only on the exponent, not on the starting value of NN. On a log-log plot the curve is a straight line with slope −α-\alpha, so the same relative drop occurs at every scale.

QuestionWith αN=0.076\alpha_N = 0.076, by what factor does the loss change when parameters go up 1000 times?Show answer

A 1000-fold increase is three factors of ten, so the loss is multiplied by (10−0.076)3=10−0.228≈0.592(10^{-0.076})^3 = 10^{-0.228} \approx 0.592. The reduction is about 41 percent, and each factor of ten gives the same 16 percent reduction, compounding.

QuestionWhy does a fixed compute budget force a trade-off between parameters and data?Show answer

Training compute is roughly C≈6NDC \approx 6 N D, the product of model size and tokens. With CC fixed, increasing NN means decreasing DD, and the joint loss has both terms, so neither can be grown without limit. The best split depends on the exponents for each resource, which is the question compute-optimal training answers.

QuestionTwo runs give losses 3.0 at N=107N = 10^7 and 2.0 at N=109N = 10^9. Estimate the exponent and predict the loss at 101110^{11}. What is the main caution?Show answer

The log-log slope is (log⁡102.0−log⁡103.0)/(9−7)=(0.301−0.477)/2=−0.088(\log_{10} 2.0 - \log_{10} 3.0) / (9 - 7) = (0.301 - 0.477)/2 = -0.088, so α≈0.088\alpha \approx 0.088. From 10910^9 to 101110^{11} is two more decades, so the loss is 2.0×102×(−0.088)=2.0×10−0.176≈2.0×0.667≈1.332.0 \times 10^{2 \times (-0.088)} = 2.0 \times 10^{-0.176} \approx 2.0 \times 0.667 \approx 1.33. The caution is that this is an extrapolation two decades past the data, so the estimate can be off if the curve bends, and the error grows with distance.

Sources