VerifiedarXiv:2001.0836124 min
Scaling · LLMs

Kaplan scaling laws: Scaling Laws for Neural Language Models

Test loss falls as a power law in model size, data and compute, so small training runs predict large ones.

Kaplan and colleagues at OpenAI trained decoder-only Transformers from 768 to 1.5 billion non-embedding parameters, about a million-fold range of sizes, and fit the test loss with a few power laws. The same equations say how much data a model needs, how to split a compute budget, and where the trends have to stop.

Explaining the paperScaling Laws for Neural Language ModelsKaplan, McCandlish, et al. · OpenAI · 2020 · arXiv:2001.08361 ↗

A January 2020 paper whose advice on spending compute shaped the largest language models for two years, until a 2022 re-measurement changed the split between parameters and data.

Before this paper, deciding how big to make a language model was mostly a matter of trying it. Kaplan and colleagues measured instead. They trained Transformer language models across six orders of magnitude in size, more than two orders of magnitude in dataset size and eight orders of magnitude in compute, and recorded the loss on held-out text, text the model never trained on. Plotted against size, data or compute on logarithmic axes, the loss falls along straight lines, and none of the lines bends at the top of the range they tested.

The loss is the cross-entropy per token in nats: the model's average negative log-probability of the true next token. It depends on three quantities: the number of parameters NN, the number of training tokens DD, and the training compute CC. When one of the three limits training and the other two are plentiful, the loss is a power law in that one.

Those fits are useful in two ways. You can predict: fit the line on small models, then read off the loss of a model a hundred times larger before paying for it. And you can allocate: with the loss written as a function of size, data and compute, you can ask which split of a fixed budget reaches the lowest loss. Kaplan's answer was to spend most of it on model size and stop training early. The field followed that answer until Chinchilla re-measured the split in 2022.

The page follows the paper's order: the power-law form and how to read it; what exactly NN, DD and CC count; the joint law for size and data, which says how much data a model needs; learning curves and why larger models need fewer steps; the critical batch size; the compute-efficient allocation; the point where the trends contradict each other; and what later work corrected.

What a power law is, and why log-log axes show it as a line

A power law says the loss is a fixed power of some quantity XX, written here as L=(Xc/X)αL = (X_c/X)^{\alpha}. Taking logarithms of both sides gives

log⁡L=αlog⁡Xc−αlog⁡X\log L = \alpha \log X_c - \alpha \log X

which is a straight line in log⁡X\log X with slope −α-\alpha. On axes that plot both quantities by their logarithms, a power law is a line, and the exponent α\alpha is how steeply it falls.

The quantities here span orders of magnitude, so the choice of axes decides what you can see. On linear axes the loss drops sharply at the far left and then runs along a nearly flat tail for the rest of the range, and a power law is hard to tell apart from an exponential or a logarithm. Pick a quantity in Figure 1 and drag the slider from linear to log-log. The curve straightens onto the dashed chord; the slope you end on is −α-\alpha.

Figure 1 · the power law
linear
One loss law on two kinds of axes. On linear axes it drops steeply and then flattens into a long tail. Slide to log-log and it becomes a straight line with slope −α-\alpha. The dashed amber chord is the straight line between the endpoints. The tabs switch between L(N), L(D) and L(C), each with the paper's constants.

The paper fits three such laws. Against non-embedding parameters:

L(N)=(Nc/N)αN,αN≈0.076,  Nc≈8.8×1013L(N) = \left(N_c/N\right)^{\alpha_N}, \qquad \alpha_N \approx 0.076,\ \ N_c \approx 8.8\times 10^{13}
(1.1)

This one is measured on models trained to convergence on enough data that data is not the limit. Against dataset size in tokens, for large models trained with early stopping (training halted once the test loss stops improving):

L(D)=(Dc/D)αD,αD≈0.095,  Dc≈5.4×1013L(D) = \left(D_c/D\right)^{\alpha_D}, \qquad \alpha_D \approx 0.095,\ \ D_c \approx 5.4\times 10^{13}
(1.2)

And against compute in PF-days, when model size and batch size are chosen to use that compute efficiently:

L(Cmin⁡)=(Ccmin⁡/Cmin⁡)αCmin⁡,αCmin⁡≈0.050,  Ccmin⁡≈3.1×108L(C_{\min}) = \left(C_c^{\min}/C_{\min}\right)^{\alpha_C^{\min}}, \qquad \alpha_C^{\min} \approx 0.050,\ \ C_c^{\min} \approx 3.1\times 10^{8}L(Cmin⁡)=(Ccmin⁡/Cmin⁡)αCmin⁡,αCmin⁡≈0.050,  Ccmin⁡≈3.1×108\begin{gathered} L(C_{\min}) = \left(C_c^{\min}/C_{\min}\right)^{\alpha_C^{\min}}, \\ \alpha_C^{\min} \approx 0.050,\ \ C_c^{\min} \approx 3.1\times 10^{8} \end{gathered}
(1.3)

The subscript on Cmin⁡C_{\min} is defined in the batch-size section below. Until then, Cmin⁡C_{\min} is the compute of a run that wastes none of it on an oversized batch.

The constants NcN_c, DcD_c and CcC_c depend on the tokenizer and dataset, and the paper says they have no fundamental meaning. The exponents carry the content. With αN≈0.076\alpha_N \approx 0.076, doubling the model multiplies the loss by 2−0.0762^{-0.076}, about 0.95, a 5% relative drop. Every further doubling multiplies it by the same 0.95, so the absolute gain shrinks as the loss shrinks. Ten doublings, a model 1024 times larger, multiply the loss by 2−0.76≈0.592^{-0.76} \approx 0.59. Data is a little steeper (a doubling of DD multiplies the loss by 0.94) and compute is shallower (a doubling multiplies it by 0.97; ten times the compute, by 0.89).

A loss of LL nats per token corresponds to a perplexity of eLe^{L}: on average the model is as uncertain as a uniform guess among that many tokens. One nat is about 1.44 bits. A 1-billion-parameter model in (1.1) has L=(8.8×104)0.076≈2.38L = (8.8\times 10^{4})^{0.076} \approx 2.38 nats, a perplexity of about 10.8.

What N, D and C count, and why model shape barely matters

Depth, width, number of attention heads and the ratio of width to depth appear nowhere in (1.1). Within the Transformer family the authors varied each of them at a fixed parameter count and found the loss moved by a few percent at most. A model with (nlayer,dmodel)=(6,4288)(n_{\text{layer}}, d_{\text{model}}) = (6, 4288) reaches a loss within 3% of the (48,1600)(48, 1600) model used in GPT-2, which has about the same parameter count, and the ratio of width to depth can vary by a factor of 40 with only a small effect on the loss. Across model families the architecture does matter: in the same paper, LSTMs matched Transformers on tokens early in the context but fell behind on later tokens.

NN is the number of non-embedding parameters: the attention and feed-forward weights, without the token-embedding matrix (nvocab dmodeln_{\text{vocab}}\, d_{\text{model}} parameters) or the positional embeddings (nctx dmodeln_{\text{ctx}}\, d_{\text{model}}). Each layer has 4d24d^2 attention weights (queries, keys, values and the output projection) and 8d28d^2 feed-forward weights (two matrices between width dd and 4d4d), so with the standard shape

N≈12 nlayer dmodel2(dattn=dff/4=dmodel)N \approx 12\, n_{\text{layer}}\, d_{\text{model}}^{2} \qquad (d_{\text{attn}} = d_{\text{ff}}/4 = d_{\text{model}})
(2.1)

The paper leaves the embeddings out because, counted with them, its loss curves depended on depth as well as on parameter count; counted without them, models of different depths fell on one line. Figure 2 draws the shape as a stack of layers, puts NN and the embedding count side by side on one bar, and prints the loss (1.1) predicts. Compare the (6, 4288) and (48, 1600) presets, which look nothing alike and get nearly the same NN, then set a 2-layer, 128-wide model and look at the bar.

Figure 2 · what N counts
6
4288
The presets and sliders set depth and width; WebText2's vocabulary of 50,257 tokens and 1024-token context fix the embedding size. The teal part of the bar is NN, the amber part the embedding parameters the laws leave out. The loss readout depends on NN alone.

At GPT-3's shape, (96, 12288), the embeddings are 0.36% of the parameters and the choice of count changes almost nothing. At (2, 128) the model has 0.39 million non-embedding parameters and 6.6 million embedding parameters, 94% of the total. The paper's size range starts at 768 non-embedding parameters, so many of its fitted points are models like this one, and the last section returns to what that did to its compute recommendation.

Compute is counted from NN as well. A forward pass costs about 2N2N floating-point operations per token, one multiply and one add per weight, plus an attention term (2nlayernctxdmodel2 n_{\text{layer}} n_{\text{ctx}} d_{\text{model}}) that is small when dmodeld_{\text{model}} is well above nctx/12n_{\text{ctx}}/12. The backward pass costs about twice the forward pass, so a training token costs about 6N6N operations, and a run of SS steps at batch size BB tokens costs

C≈6 N B SC \approx 6\,N\,B\,S

The paper quotes compute in PF-days: 101510^{15} operations per second for a day, 8.64×10198.64\times 10^{19} operations. The paper's default run trains for 2.5×1052.5\times 10^{5} steps at 512 sequences of 1024 tokens (2192^{19} tokens) per batch with Adam (Adafactor, a lower-memory variant, for models above a billion parameters), a 3000-step linear warmup and a cosine decay to zero. With the definitions fixed, (1.1) can be evaluated directly:

# the single-variable fits (Kaplan et al., WebText2, loss in nats/token)
aN, Nc = 0.076, 8.8e13         # L(N) = (Nc / N) ** aN, N = non-embedding params
aD, Dc = 0.095, 5.4e13         # L(D) = (Dc / D) ** aD, D = tokens

def loss_from_params(N):
    return (Nc / N) ** aN

loss_from_params(1e9)          # 2.38 nats/token, perplexity e**2.38 = 10.8
loss_from_params(1.5e9)        # 2.30
loss_from_params(2e9) / loss_from_params(1e9)   # 2 ** -0.076 = 0.949

How much data a model needs: the joint law L(N, D)

Laws (1.1) and (1.2) each assume the other resource is unlimited. With a fixed amount of text and a growing model, the model eventually fits the particular text it was given better than the language that produced it, and the test loss stops improving. The paper fits one equation over both variables, the early-stopped test loss:

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

With unlimited data, Dc/DD_c/D goes to zero and (1.5) reduces to (Nc/N)αN(N_c/N)^{\alpha_N}, which is (1.1). With an unlimited model, the first term goes to zero and (1.5) reduces to (Dc/D)αD(D_c/D)^{\alpha_D}, which is (1.2). In between, the larger of the two terms inside the bracket sets the loss. The joint fit has its own constants (αN=0.076\alpha_N = 0.076, αD=0.103\alpha_D = 0.103, Nc=6.4×1013N_c = 6.4\times 10^{13}, Dc=1.8×1013D_c = 1.8\times 10^{13}), slightly different from the single-variable fits because it is fit to a different set of runs.

The paper measures overfitting as the relative excess loss over the infinite-data value, δL=L(N,D)/L(N,∞)−1\delta L = L(N,D)/L(N,\infty) - 1. Substituting (1.5):

δL≈(1+(NNc)αN/αDDcD)αD−1\delta L \approx \left(1 + \left(\frac{N}{N_c}\right)^{\alpha_N/\alpha_D} \frac{D_c}{D}\right)^{\alpha_D} - 1
(4.3)

NN and DD enter only through the combination NαN/αD/DN^{\alpha_N/\alpha_D}/D. With the joint-fit exponents that is 0.076/0.103=0.740.076/0.103 = 0.74, so overfitting depends on N0.74/DN^{0.74}/D. Dividing the single-variable exponents instead (0.076/0.095) would give 0.80, a different number from a different fit. Seed-to-seed variation in the loss is about 0.02, so the paper asks forδL\delta L below that, which gives

D≳(5×103)N0.74D \gtrsim \left(5\times 10^{3}\right) N^{0.74}
(4.4)

In Figure 3 the dashed line is (1.1), the infinite-data limit, and the bright curve is (1.5) for the dataset size on the slider. The amber marker sits at the largest model (4.4) allows for that data. Past it, the bright curve leaves the dashed line and flattens toward the floor (Dc/D)αD(D_c/D)^{\alpha_D} set by the data alone.

Figure 3 · overfitting
583M tok
Loss against model size on log-log axes. The dashed line is the infinite-data law; the faint curves are fixed datasets from 20M to 200B tokens. Drag the dataset size: the amber marker moves to the largest NN that rule (4.4) allows, and the readout gives the loss penalty there.

The exponent 0.74 is below 1, so data has to grow with the model but more slowly. A model eight times larger needs 80.74≈4.78^{0.74} \approx 4.7 times the data to stay within the threshold; the paper rounds this to "roughly 5x".

Take N=109N = 10^9. Law (1.1) predicts 2.38 nats if data is not the limit. Rule (4.4) asks for 5×103×(109)0.745\times 10^{3} \times (10^{9})^{0.74}. The power is 106.66≈4.6×10610^{6.66} \approx 4.6\times 10^{6}, and times 5000 that is about 2.3×10102.3\times 10^{10} tokens, 23 billion. WebText2, the paper's training set, has 2.29×10102.29\times 10^{10} tokens in total, of which 6.6×1086.6\times 10^{8} are held out for testing, so a billion-parameter model is about the largest this dataset supports. The paper says the same: models below about 10910^9 parameters train with minimal overfitting on WebText2, and its largest models see mild overfitting. Train the billion-parameter model on a tenth of that data, 2.3 billion tokens, and (4.3) puts its loss about 13% above the infinite-data value.

Larger models learn faster: the learning-curve law L(N, S)

The second pairing is model size against training time. A larger model does more arithmetic per step, and it is natural to expect it to need more steps as well. The paper finds the opposite: larger models reach any given loss in fewer optimization steps and after seeing fewer tokens. After an initial transient, learning curves with unlimited data fit

L(N,Smin⁡)=(NcN)αN+(ScSmin⁡)αS,αS≈0.76,  Sc≈2.1×103L(N, S_{\min}) = \left(\frac{N_c}{N}\right)^{\alpha_N} + \left(\frac{S_c}{S_{\min}}\right)^{\alpha_S}, \qquad \alpha_S \approx 0.76,\ \ S_c \approx 2.1\times 10^{3}L(N,Smin⁡)=(NcN)αN+(ScSmin⁡)αS,αS≈0.76,  Sc≈2.1×103\begin{gathered} L(N, S_{\min}) = \left(\frac{N_c}{N}\right)^{\alpha_N} + \left(\frac{S_c}{S_{\min}}\right)^{\alpha_S}, \\ \alpha_S \approx 0.76,\ \ S_c \approx 2.1\times 10^{3} \end{gathered}
(1.6)

In (1.6), Smin⁡S_{\min} is the number of steps the run would need at a very large batch, a correction the next section defines; for a run at a fixed batch below the critical size it is smaller than the raw step count. The fit's own αN\alpha_N and NcN_c are 0.077 and 6.5×10136.5\times 10^{13}.

The first term is the loss the model converges to, lower for a larger model. The second term decays with training and has the same form for every size. Each model descends the same curve shape onto its own floor, and a larger model's floor is lower, so its whole curve is lower. At a target of 3.8 nats, (1.6) gives a 300M-parameter model 1.6 thousand steps and a 3M-parameter model 31 thousand. A 300k-parameter model has a floor of 4.38 nats and never reaches 3.8, however long it trains.

Figure 4 · sample efficiency
3.43 nats
Learning curves from (1.6), one per model size, on log-log axes. Drag the target loss: the dots mark where each curve crosses it, and the readout lists the step counts and the models whose floor sits above the target.

Two consequences follow for a fixed compute budget. A large model reaches a given loss in fewer steps, so it can be stopped early. A small model trained to convergence ends at its floor, which a larger model passes partway through its own run. Whether stopping a large model early beats converging a small one at equal compute is the question the compute section answers.

The critical batch size

Batch size sets a trade between time and compute. A larger batch gives a less noisy gradient, so fewer steps reach the same loss, but each step processes more tokens. The paper uses the empirical model of McCandlish et al. (2018): to reach a fixed loss, the number of steps SS and the number of training tokens EE satisfy

(SSmin⁡−1)(EEmin⁡−1)=1\left(\frac{S}{S_{\min}} - 1\right)\left(\frac{E}{E_{\min}} - 1\right) = 1
(5.1)

where Smin⁡S_{\min} is the fewest steps that can reach the loss (with a very large batch) and Emin⁡E_{\min} the fewest tokens (with a very small batch). Their ratio defines the critical batch size, Bcrit=Emin⁡/Smin⁡B_{\text{crit}} = E_{\min}/S_{\min}. Solving (5.1) at batch BB gives S=Smin⁡(1+Bcrit/B)S = S_{\min}(1 + B_{\text{crit}}/B) and E=Emin⁡(1+B/Bcrit)E = E_{\min}(1 + B/B_{\text{crit}}). Well below BcritB_{\text{crit}}, doubling the batch nearly halves the steps and costs almost no extra tokens. Well above it, doubling the batch nearly doubles the tokens and saves almost no steps. At B=BcritB = B_{\text{crit}} a run takes twice the minimum steps and twice the minimum tokens.

Kaplan's measurement is that BcritB_{\text{crit}} does not depend on model size, only on the loss being targeted:

Bcrit(L)≈B∗L1/αB,B∗≈2×108 tokens,  αB≈0.21B_{\text{crit}}(L) \approx \frac{B_*}{L^{1/\alpha_B}}, \qquad B_* \approx 2\times 10^{8}\ \text{tokens},\ \ \alpha_B \approx 0.21
(1.4)

With 1/αB≈4.81/\alpha_B \approx 4.8, the critical batch grows quickly as the loss falls. At L=4L = 4 it is about 270 thousand tokens; at L=3L = 3, 2×108/34.76≈1.12\times 10^{8}/3^{4.76} \approx 1.1 million. The paper's default batch of 2192^{19} = 524,288 tokens sits below it at a loss of 3, so those runs took about three times the minimum steps and about 1.5 times the minimum tokens. In Figure 5 the teal curve is S/Smin⁡S/S_{\min}, the cost in time, and the amber curve E/Emin⁡E/E_{\min}, the cost in tokens and therefore in compute at fixed model size. They cross at BcritB_{\text{crit}}, both at 2. Lower the target loss and watch the crossing move right.

Figure 5 · the critical batch size
525k tok
3.00 nats
Steps and tokens needed to reach the target loss, as multiples of their minimums, against batch size. Drag the batch to move the dots along both curves; drag the target loss to move BcritB_{\text{crit}} from (1.4). The tick on the axis marks the paper's default batch, 2192^{19} tokens.

The trade-off defines the corrected compute used in (1.3). A run at batch BB spends compute CC; the same run at a batch far below BcritB_{\text{crit}} would process only Emin⁡E_{\min} tokens and spend

Cmin⁡=C1+B/Bcrit(L)C_{\min} = \frac{C}{1 + B/B_{\text{crit}}(L)}
(5.5)

and Smin⁡=S/(1+Bcrit/B)S_{\min} = S/(1 + B_{\text{crit}}/B) is the matching correction for steps, the one used in (1.6). The paper's runs used a fixed batch, which was too large for early, high-loss parts of training and too small late in training; converting to Cmin⁡C_{\min} and Smin⁡S_{\min} removes that and gives cleaner fits. A run at exactly BcritB_{\text{crit}} spends C=2Cmin⁡C = 2C_{\min}.

How to spend a compute budget: the compute-efficient frontier

With a fixed compute budget, C≈6NBSC \approx 6NBS makes model size and training length compete: a larger model costs more per step, so it gets fewer steps. The question is which model size turns the budget into the lowest loss.

Each model size traces a curve of loss against compute spent as it trains, falling and then flattening at its converged loss. Draw the curves for all sizes on one plot and take the lowest loss reached at each compute value; that lower envelope is the compute-efficient frontier. In Figure 6, move the budget and look at where the highlighted model sits when it touches the frontier.

Figure 6 · the compute frontier
30 PF-d
Loss against compute on log-log axes. Each dim curve is one model size training; the amber line is the frontier. The budget slider picks a point on the frontier, highlights the model that is optimal there, and draws its converged loss as a dashed line. The readout compares the loss where it stops with the loss it would converge to.

The frontier touches each model's curve while that curve is still falling, above the model's converged loss. Near convergence each extra step lowers the loss by very little, so the last stretch of a long run buys less loss per FLOP than the same FLOPs spent on a larger model that is still early in training. The compute-efficient choice is to train a large model and stop well short of convergence. The optimal size grows with compute as

N(Cmin⁡)∝Cmin⁡ 0.73N(C_{\min}) \propto C_{\min}^{\,0.73}
(6.1)

The batch grows as Cmin⁡0.24C_{\min}^{0.24}, because it tracks BcritB_{\text{crit}}, which grows as the loss falls, and the number of steps as Cmin⁡0.03C_{\min}^{0.03}, almost flat. The three exponents add to 1.00, as they must: Cmin⁡=6NBSC_{\min} = 6NBS with BB at the critical batch and S=Smin⁡S = S_{\min}, so the growth of the three factors has to multiply to the growth in compute.

The paper also derives the allocation from (1.6) and (1.4) instead of reading it off the frontier. Substituting Smin⁡=Cmin⁡/(6NB)S_{\min} = C_{\min}/(6NB) into (1.6) and minimizing over NN at fixed compute gives

N∝CαCmin⁡/αN,B∝CαCmin⁡/αB,S∝CαCmin⁡/αS,αCmin⁡=11/αS+1/αB+1/αNN \propto C^{\alpha_C^{\min}/\alpha_N},\quad B \propto C^{\alpha_C^{\min}/\alpha_B},\quad S \propto C^{\alpha_C^{\min}/\alpha_S},\qquad \alpha_C^{\min} = \frac{1}{1/\alpha_S + 1/\alpha_B + 1/\alpha_N}N∝CαCmin⁡/αN,B∝CαCmin⁡/αB,S∝CαCmin⁡/αS,αCmin⁡=11/αS+1/αB+1/αN\begin{gathered} N \propto C^{\alpha_C^{\min}/\alpha_N},\quad B \propto C^{\alpha_C^{\min}/\alpha_B},\quad S \propto C^{\alpha_C^{\min}/\alpha_S}, \\ \alpha_C^{\min} = \frac{1}{1/\alpha_S + 1/\alpha_B + 1/\alpha_N} \end{gathered}
(1.7–1.8)

Equation (1.8) is the condition that makes the three exponents in (1.7) add to 1. The paper's values give αCmin⁡≈0.054\alpha_C^{\min} \approx 0.054 and N∝Cmin⁡0.71N \propto C_{\min}^{0.71}, within a few percent of the measured 0.050 and 0.73. The exponent on NN is large because αN\alpha_N is the smallest of the three: the loss responds least to NN, so NN has to grow fastest.

The paper's Appendix A gives the prefactors. At Cmin⁡=1C_{\min} = 1 PF-day the recommended run is a 1.3-billion-parameter model, a batch of 2 million tokens and 5,400 steps; 6NBS6NBS for those numbers is 8.4×10198.4\times 10^{19} operations, one PF-day. Trained at BcritB_{\text{crit}}, the run sees about 2×10102\times 10^{10} tokens, each once.

# Kaplan's compute-efficient allocation (Table 6), C_min in PF-days
def allocate(C_min):
    N = 1.3e9 * C_min ** 0.73   # non-embedding parameters
    B = 2.0e6 * C_min ** 0.24   # batch size in tokens, tracks B_crit
    S = 5.4e3 * C_min ** 0.03   # minimum steps S_min
    D = 2.0e10 * C_min ** 0.27  # tokens, one epoch at B = B_crit
    return N, B, S, D

allocate(1)      # 1.3e9 params, 2.0e6-token batch, 5.4e3 steps, 2.0e10 tokens
allocate(10)     # N x5.4, B x1.7, S x1.07: almost all of it goes into N
6 * 1.3e9 * 2.0e6 * 5.4e3 / 8.64e19   # = 0.97, so C_min = 6 N B S checks out

At Cmin⁡=1000C_{\min} = 1000 PF-days the same formulas give a 200-billion-parameter model trained on 130 billion tokens, fewer tokens than parameters. The paper notes that in practice hardware constraints lead people to train smaller models for longer than this. The allocation was the paper's practical recommendation and the part later work revised; the last section covers how.

Where the trends must stop

Section 6.3 of the paper shows that its own trends contradict each other at large enough compute. Rule (4.4) says data should grow as N0.74N^{0.74} to avoid overfitting, and with N∝Cmin⁡0.73N \propto C_{\min}^{0.73} that is D∝Cmin⁡0.54D \propto C_{\min}^{0.54}. Compute-efficient training uses much less: one pass over data that grows as about Cmin⁡0.27C_{\min}^{0.27}. So at large compute a compute-efficient run is data-limited, and a data-limited run follows (1.2): the loss can fall no faster than D−0.095∝Cmin⁡−0.03D^{-0.095} \propto C_{\min}^{-0.03}. The compute law (1.3) falls as Cmin⁡−0.05C_{\min}^{-0.05}, faster than that floor. The compute trend starts above the floor, and a steeper line eventually crosses a shallower one.

Past the crossing, (1.3) would predict a lower loss than the data can support, so the trends have to break at or before it. The paper puts the crossing at

C∗∼104 PF-days,N∗∼1012 parameters,D∗∼1012 tokens,L∗∼1.7 nats/tokenC^{*} \sim 10^{4}\ \text{PF-days}, \quad N^{*} \sim 10^{12}\ \text{parameters}, \quad D^{*} \sim 10^{12}\ \text{tokens}, \quad L^{*} \sim 1.7\ \text{nats/token}C∗∼104 PF-days,N∗∼1012 parameters,D∗∼1012 tokens,L∗∼1.7 nats/token\begin{gathered} C^{*} \sim 10^{4}\ \text{PF-days}, \quad N^{*} \sim 10^{12}\ \text{parameters}, \\ D^{*} \sim 10^{12}\ \text{tokens}, \quad L^{*} \sim 1.7\ \text{nats/token} \end{gathered}
(6.8)

and says these values are uncertain by an order of magnitude in either direction, depending on the exact exponents. As a check, (1.3) at 10410^{4} PF-days gives (3.1×104)0.05≈1.68(3.1\times 10^{4})^{0.05} \approx 1.68 nats. Drag the compute in Figure 7 toward the crossing and watch the gap between the two lines close.

Figure 7 · where the trends cross
9 PF-d
The compute trend (slope −0.05) and the data-limited floor (slope −0.03), both anchored at the paper's crossing. Drag the compute: the readout gives the gap between them, and past C∗C^{*} the compute trend is dashed because it predicts a loss the data cannot reach.

The authors then offer a conjecture and label it as one. If a model cannot grow past N∗N^{*} without needing qualitatively more data, perhaps at that point it has extracted all the reliable information in the text, and L∗L^{*} would be a rough estimate of the entropy per token of natural language. Using the paper's figure of 4.3 characters per WebText2 token, 1.7 nats per token is 2.45 bits per token, or about 0.57 bits per character. The paper presents this as an interpretation of the crossing, and its measured trends showed no sign of levelling off in the range it tested.

What Chinchilla corrected, and what held up

GPT-3 followed in May 2020, four months after this paper. At 175 billion parameters it was, in its authors' words, ten times larger than any previous non-sparse language model, and about a hundred times larger than GPT-2. Its authors report that the loss-versus-compute trend from this paper continued for two more orders of magnitude, with small deviations from the predicted curve. The authors of the scaling paper compare their relations to the ideal gas law, which relates pressure, volume and temperature without reference to how individual molecules move; here loss is related to size, data and compute with little dependence on most architectural details.

The large models of the next two years were trained with the compute-efficient recipe's proportions: GPT-3, Jurassic-1, Gopher and Megatron-Turing NLG each saw about 300 billion training tokens, with 175 to 530 billion parameters. In 2022 DeepMind's Chinchilla paper re-measured the split and found parameters and tokens should grow about equally, each as roughly C0.5C^{0.5}, which works out to about 20 tokens per parameter. By that measure those models were undertrained: too large for the data they were shown. Figure 8 puts the two prescriptions side by side for the same compute. At Cmin⁡=1000C_{\min} = 1000 PF-days, Kaplan's formulas give 200 billion parameters on 130 billion tokens; 20 tokens per parameter with the same total FLOPs gives 38 billion parameters on 760 billion tokens.

Figure 8 · two ways to split a budget
1.0e+3 PF-d
Model size (teal) and training tokens (amber) against compute. Solid lines are Kaplan's Table 6 allocation; dashed lines spend the same total FLOPs at 20 tokens per parameter. Drag the compute: the readout gives both splits at that budget.

The two recipes agree near Cmin⁡≈0.6C_{\min} \approx 0.6 PF-days, where both give a model of about 900 million parameters, and diverge from there. That agreement point lies inside the compute range the paper measured, and a small disagreement in a fitted exponent grows into a large one over several orders of magnitude of extrapolation.

Chinchilla's main explanation for the gap was Kaplan's learning-rate schedule. Every run used a cosine decay set for a fixed length, so a checkpoint taken partway through a long run still had a high learning rate and a loss above what a run tuned to end there would reach. Chinchilla also pointed out that most of Kaplan's runs were small, many under 100 million parameters. Two 2024 papers took the gap apart. Pearce and Song found the main cause was the non-embedding count from the second section, combined with fitting at small scale: where embeddings are a large share of all parameters, counting them or not changes the fitted exponent. Porian and colleagues identified the rest: leaving out the compute of the final output layer, a 3000-step warmup that was too long for the smallest models, and not re-tuning the optimizer at each scale. They reproduce Chinchilla's exponent (0.497 to 0.518) with a constant learning rate, so the schedule was not essential.

None of this changed the power laws. Later models moved further in Chinchilla's direction for a different reason: LLaMA trained its 7-billion-parameter model on 1.0 trillion tokens, about 150 per parameter, accepting more training compute for a smaller model that is cheaper to run. Later work kept the paper's forms (loss as a smooth power law in scale, a joint law over size and data, a critical batch size set by the loss, and an allocation read off a fitted frontier) and replaced its allocation exponent, 0.73, with about 0.5.

Provenance Verified against primary literatureHow we verify
Kaplan et al. (2020)The power laws L(N), L(D), L(C_min), the joint L(N,D) and L(N,S) fits, the critical batch size B_crit(L), C = 6NBS, and the compute-efficient allocation N ∝ C_min^0.73, B ∝ C_min^0.24, S ∝ C_min^0.03, all measured on WebText2.
McCandlish et al. (2018)An Empirical Model of Large-Batch Training (arXiv:1812.06162): the steps-versus-examples trade-off (S/S_min − 1)(E/E_min − 1) = 1 and the critical batch size that Kaplan measures as a function of loss.
Kaplan et al. (2020), Eq. (6.7) vs Table 6Eq. (6.7) writes the one-epoch data as 2C_min/6N(C_min) ≈ (4×10^10 tokens)·C_min^0.26. With N(C_min) = 1.3×10^9·C_min^0.73 from Table 6 that expression gives 2.2×10^10 tokens at 1 PF-day, and Table 6 itself lists D_e = 2×10^10 with exponent 0.27. This page uses Table 6.
Hoffmann et al. (2022)Chinchilla: re-measured the compute-optimal split as roughly equal, N_opt ∝ C^~0.5 and D_opt ∝ C^~0.5 (a = b = 0.50 in their Approach 1), which works out to about 20 tokens per parameter.
Pearce & Song (2024)arXiv:2406.12907: counting non-embedding instead of total parameters, combined with fitting at small scale, is the main cause of Kaplan’s steeper allocation exponent.
Porian et al. (2024)arXiv:2406.19146: the rest of the gap comes from leaving out the last layer’s compute, a warmup too long for small models, and not re-tuning the optimizer per scale. They match Chinchilla with a constant learning rate, so learning-rate decay is not essential.
correctionThis paper’s compute-optimal prescription (put most new compute into model size, N ∝ C_min^0.73, and stop well before convergence) was overturned by Chinchilla (2022), which found size and data should grow about equally, each ∝ C^~0.5. The power laws themselves hold up; the allocation exponent was wrong. The cause was methodological and had several parts: counting non-embedding rather than total parameters at small scale (Pearce & Song, 2406.12907), and a fixed warmup that was too long for the smallest models, leaving out the decoder-head FLOPs, and not re-tuning the optimizer per scale (Porian et al., 2406.19146). Chinchilla’s main hypothesis, that the fixed cosine learning-rate schedule was responsible, is incomplete: Porian et al. reproduce Chinchilla’s exponent with a constant learning rate. Separately, Eq. (6.7) states the one-epoch data prefactor as 4×10^10 tokens, twice what its own formula and Table 6 give (2×10^10).

Questions you might still have

?

Are these laws still believed, now that Chinchilla exists?
The power laws are. Test loss falls smoothly as a power law in parameters, data and compute, and later work kept fitting that form. What Chinchilla overturned was this paper’s compute-optimal split, N ∝ C_min^0.73. The split that holds up is close to equal growth of parameters and tokens, about 20 tokens per parameter. The Chinchilla explainer on this site walks through that re-measurement.

?

Why count only non-embedding parameters?
With embedding parameters counted, the paper found loss depended on depth as well as on the parameter count; without them, models of different depths fell on one line. The cost shows up at small sizes, where the embedding table is most of the model: a 2-layer, 128-wide model has 0.39M non-embedding parameters and 6.6M embedding parameters. Fits made there come out different depending on which count is used, and Pearce and Song trace most of the Kaplan-Chinchilla gap to this choice.

?

If the loss keeps falling as a power law, does the model keep getting better forever?
No, for two reasons. Each doubling of parameters multiplies the loss by about 0.95, so the absolute gain per doubling shrinks as the loss shrinks. And Section 6.3 of the paper shows the compute trend has to break near 1.7 nats per token, around 10^4 PF-days, because past that point it predicts a lower loss than the available data can support. Natural language has non-zero entropy, so some floor exists.

?

Loss is in nats. What does a loss of 2 mean?
A nat is the natural-log unit of information; one nat is about 1.44 bits. A cross-entropy of L nats per token equals a perplexity of e^L: on average the model is as uncertain as a uniform guess among e^L tokens. A loss of 2 nats is a perplexity of about 7.4.

?

Why does the critical batch size depend on the loss and not on the model size?
The paper measured B_crit for models of different sizes and found it lined up as a function of the loss reached, not of N. The explanation it offers comes from McCandlish et al.: B_crit tracks the gradient noise scale, the batch size at which averaging more examples stops making the gradient estimate noticeably better. As the loss falls, the useful signal in each example’s gradient shrinks relative to its noise, so larger batches keep helping.

?

Why would loss follow a power law at all?
The paper does not derive it; the laws are empirical fits. Its related-work section notes that power laws arise from many mechanisms and points to work on density estimation and random forests where the exponent roughly corresponds to the inverse of the number of relevant features in the data. For the joint law (1.5) it gives some motivation for the functional form, but the exponents themselves are measured.

?

Can I use these constants for my own model?
The constants N_c, D_c and C_c depend on the tokenizer and the dataset, and the paper says they have no fundamental meaning. The exponents are the part it claims carries over. The practical recipe is the paper’s method: train a range of small models on your own data, fit the lines, and extrapolate. The paper also reports that loss on other text distributions tracks WebText2 loss with a roughly constant offset.

Footnotes & further reading

  1. The paper: Kaplan, McCandlish, Henighan, Brown, Chess, Child, Gray, Radford, Wu, Amodei, Scaling Laws for Neural Language Models (OpenAI, 2020).
  2. The critical batch size and the steps-versus-examples trade-off: McCandlish, Kaplan, Amodei et al., An Empirical Model of Large-Batch Training (2018).
  3. The follow-up that corrected the compute-optimal split: Hoffmann et al., Training Compute-Optimal Large Language Models (Chinchilla, DeepMind 2022). There is an explainer of Chinchilla on this site.
  4. The two reconciliations of the Kaplan and Chinchilla exponents: Pearce & Song, Reconciling Kaplan and Chinchilla Scaling Laws (2024), and Porian, Wortsman, Jitsev, Schmidt, Carmon, Resolving Discrepancies in Compute-Optimal Scaling of Language Models (NeurIPS 2024).
  5. The WebText corpus and the byte-pair tokenizer come from the GPT-2 work: Radford et al., Language Models are Unsupervised Multitask Learners (2019).
  6. The model built on these curves: Brown et al., Language Models are Few-Shot Learners (GPT-3, 2020), and the GPT-3 explainer.