# Scaling Laws for Neural Language Models

> OpenAI's 2020 paper trained Transformers of 768 to 1.5 billion parameters on WebText2 and found that loss falls as a power law in parameters, data and compute, almost regardless of shape. At a fixed budget, grow the model first (size ∝ compute^0.73). A breakdown that checks the numbers.

- URL: https://dmxsf.com/en/blog/scaling-laws-for-neural-language-models/
- [DMXSF](https://dmxsf.com/en/about/)
- Published: 2020-02-04
- Updated: 2026-11-09
- Paper notes
- Paper: [Scaling Laws for Neural Language Models](https://arxiv.org/abs/2001.08361) (Jared Kaplan, Sam McCandlish, Tom Henighan, et al. · arXiv, 2020)

## Why this paper matters

Kaplan et al. (OpenAI, January 2020) asked a question that had almost no quantitative answer before GPT-3: **how does the test loss of a language model change with scale, and how should a fixed compute budget be split between parameters and data?** They trained Transformers on WebText2 with 768 to 1.5 billion non-embedding parameters and 22 million to 23 billion training tokens, and reached three main conclusions:

1. Test loss falls as a **power law** in the parameter count $N$, the dataset size $D$ and the optimally allocated compute $C_{\min}$. Within the paper's range (8 orders of magnitude of compute, 6 of parameters, a little over 2 of data) the data show no sign of bending away from a straight line.
2. At a fixed parameter count, **shape** (depth, width, number of attention heads) has only a small effect on loss.
3. At a fixed compute budget, the extra compute should go **mainly into a bigger model**: the optimal size grows as $N \propto C_{\min}^{0.73}$, while the data only needs to grow slowly, as $D \propto C_{\min}^{0.27}$.

A later replication (Porian et al., 2024) writes that this law was influential in choosing the size of GPT-3 and several later models. Two years after the paper, Chinchilla changed the conclusion to parameters and data growing about in step, and still later work traced the disagreement to specific experimental details. So the paper is both a method and a case that later work has checked item by item. This breakdown verifies the numbers in the paper and marks which of them turned out to be unreliable. The derivations and Chinchilla's full result are on the wiki page [Scaling Laws](https://dmxsf.com/en/wiki/pretraining/scaling-laws/), and they are not repeated here.

*Figure: The left panel plots the paper's fits L(N) = (N_c/N)^0.076 (N_c = 8.8×10¹³) and L(D) = (D_c/D)^0.095 (D_c = 5.4×10¹³); both are straight lines on log-log axes. Solid segments cover the range of the paper's experiments (N from 768 to 1.5×10⁹, D from 2.2×10⁷ to 2.3×10¹⁰) and dashed segments are extrapolation. The right panel is computed from the paper's exponents 0.73, 0.27, 0.24 and 0.03: when compute grows 10 times, most of it should go into a larger model.*

The table collects every quantitative result of the paper; the sections below explain them one by one. $N$ counts non-embedding parameters (no vocabulary or position embeddings), and loss is in nats per token.

| Result | Formula and fitted values | Conditions |
| --- | --- | --- |
| Loss falls with parameters | $L(N)=(N_c/N)^{\alpha_N}$, $\alpha_N\approx0.076$, $N_c\approx8.8\times10^{13}$ | Enough data, trained to convergence |
| Loss falls with data | $L(D)=(D_c/D)^{\alpha_D}$, $\alpha_D\approx0.095$, $D_c\approx5.4\times10^{13}$ tokens | Large model, early stopping |
| Loss falls with compute | $L(C_{\min})=(C_c^{\min}/C_{\min})^{\alpha_C^{\min}}$, $\alpha_C^{\min}\approx0.050$, $C_c^{\min}\approx3.1\times10^{8}$ PF-days | Enough data, best model size, batch far below critical |
| Data needed to avoid overfitting | $D\gtrsim5\times10^{3}\,N^{0.74}$ | Within 0.02 of the converged loss |
| Critical batch size | $B_{\mathrm{crit}}\approx B_*/L^{1/\alpha_B}$, $B_*\approx2\times10^{8}$ tokens, $\alpha_B\approx0.21$ | Depends only on the loss, not on model size |
| Optimal allocation | $N\propto C_{\min}^{0.73}$, $B\propto C_{\min}^{0.24}$, $S\propto C_{\min}^{0.03}$, $D=B\cdot S$ | Compute measured as $C_{\min}$ |

## What the experiments were

| Item | Setup |
| --- | --- |
| Data | WebText2: web pages linked from Reddit (through October 2018, at least 3 karma), 20.3 million documents, 96 GB of text, $2.29\times10^{10}$ tokens (BPE, vocabulary of 50,257). $6.6\times10^{8}$ tokens are held out for testing, and generalization is also measured on Books Corpus, Common Crawl, English Wikipedia and a set of public internet books |
| Models | Decoder-only Transformers, context of 1,024 tokens; 768 to 1.5 billion non-embedding parameters, with shapes from $(n_{layer}, d_{model})=(2,128)$ to $(6,4288)$ and $(207,768)$ |
| Conventions | $N\approx12\,n_{layer}\,d_{model}^{2}$, without vocabulary or position embeddings; training compute $C\approx6NBS$ ($B$ is the batch size in tokens, $S$ the number of steps); 1 PF-day $=10^{15}\times24\times3600=8.64\times10^{19}$ FLOPs |
| Optimization | Adam, $2.5\times10^{5}$ steps, 512 sequences × 1,024 tokens $=2^{19}$ tokens per batch; 3,000 steps of linear warmup, then cosine decay to zero; models above 1 billion parameters use Adafactor because of memory |
| Metric | Cross-entropy averaged over a 1,024-token context |

Training compute counts only $6N$ per token for the non-embedding parameters. It leaves out the matrix multiplication of the output layer (the unembedding) and the attention term that depends on the context length, which the paper says is small when $d_{model}\gg n_{ctx}/12$. As we will see, leaving out the output layer, the fixed batch size and the fixed-length warmup are what later replications found when they went looking for the disagreement with Chinchilla.

## Finding 1: scale decides, shape barely matters

The most surprising result is that model shape hardly matters. With the non-embedding parameter count $N$ fixed, changing the feed-forward ratio $d_{ff}/d_{model}$, the aspect ratio $d_{model}/n_{layer}$ or the head dimension $d_{model}/n_{head}$ one at a time moves the loss by only a few percent (Figure 5, run with models of 25 and 50 million parameters). The aspect ratio can vary by a factor of 40 with little effect, and a model with $(n_{layer}, d_{model})=(6,4288)$ reaches a loss within 3% of the $(48,1600)$ shape used by GPT-2. With $N\approx12\,n_{layer}\,d_{model}^2$, the shapes the paper mentions have similar parameter counts but differ in depth by more than a factor of thirty:

```python
# The three shapes (n_layer, d_model) the paper mentions, with
# N ~ 12 * n_layer * d_model^2
for n_layer, d_model in [(6, 4288), (48, 1600), (207, 768)]:
    n = 12 * n_layer * d_model ** 2
    print(f"({n_layer}, {d_model}): N = {n / 1e9:.2f}B")
```

Output:

```text
(6, 4288): N = 1.32B
(48, 1600): N = 1.47B
(207, 768): N = 1.47B
```

Three more observations matter just as much:

- **Count only non-embedding parameters and the trend is clean.** If the vocabulary and position embeddings are included in $N$, models of different depth scatter onto several curves. With only non-embedding parameters, everything except models with fewer than 2 layers or extreme aspect ratios lands on one curve (Figure 6). The paper concludes that the embedding matrix could be made smaller without hurting performance.
- **Transformers use long context better than LSTMs.** An LSTM matches a Transformer on the first tokens of the context, but its loss stops improving after about 100 tokens, while the Transformer keeps improving across the whole 1,024 tokens (Figure 7).
- **Out-of-distribution loss follows in-distribution loss.** A model trained only on WebText2 also follows a power law in $N$ on Books Corpus, Common Crawl and English Wikipedia, with almost the same slope and only a small, slowly growing offset. Generalization depends almost entirely on the in-distribution validation loss, not on how long the model trained or whether it converged (Figure 8).

## Finding 2: three power laws

The paper measured the loss under three different bottlenecks, which gives three power laws. Each holds only under its own conditions:

- **$L(N)$**: trained close to convergence on enough data, the loss depends only on the non-embedding parameter count. The data is all of WebText2, and no overfitting was seen except possibly for the very largest models.
- **$L(D)$**: one large model with $(n_{layer}, n_{embd})=(36,1280)$ is trained on fixed subsets of WebText2 of different sizes and stopped as soon as the test loss no longer improves (early stopping).
- **$L(C_{\min})$**: for a given compute $C=6NBS$, take the best result over all model sizes. The paper first builds an empirical curve at a fixed batch size (Figure 1), then corrects it to $C_{\min}$ with the critical batch size introduced below, and says that predictions should use the $C_{\min}$ trend.

The paper also stresses that the values of $N_c$, $D_c$ and $C_c^{\min}$ depend on the vocabulary and tokenization and have no fundamental meaning. What matters is the exponents. They are small, so returns diminish but stay steady. A few numbers from the paper's fits:

```python
# The paper's fits: L(N) = (Nc/N)^aN, L(D) = (Dc/D)^aD, in nats/token (WebText2)
aN, Nc = 0.076, 8.8e13
aD, Dc = 0.095, 5.4e13

print("loss factor, params x2 / x10:", f"{2 ** -aN:.3f} / {10 ** -aN:.3f}")
print("loss factor, data   x2 / x10:", f"{2 ** -aD:.3f} / {10 ** -aD:.3f}")
for n in (1e7, 1e8, 1e9):  # loss set by model size when data is not limiting
    print(f"N = {n:.0e}: L(N) = {(Nc / n) ** aN:.2f}")
```

Output:

```text
loss factor, params x2 / x10: 0.949 / 0.839
loss factor, data   x2 / x10: 0.936 / 0.804
N = 1e+07: L(N) = 3.37
N = 1e+08: L(N) = 2.83
N = 1e+09: L(N) = 2.38
```

Doubling the parameters multiplies the loss by $2^{-0.076}\approx0.949$, a drop of only about 5%, and a factor of 10 gives 0.839. The data exponent is a little larger (0.095), so doubling the data multiplies the loss by about 0.936. The last three lines show $L(N)$ at a few sizes: $10^9$ parameters correspond to about 2.38 nats per token. That absolute value only makes sense with the paper's WebText2 and tokenizer; with another vocabulary the constants must be refit.

> [!NOTE] The three laws cannot simply be stacked
> $L(N)$, $L(D)$ and $L(C_{\min})$ each describe a case in which one factor is the bottleneck: the first assumes unlimited data, the second an unlimited model, the third that both the model size and the batch size are optimal. Real training is limited by several factors at once, and describing it takes $L(N,D)$ in the next section and $L(N,S_{\min})$ later.

## Finding 3: data requirements and overfitting

To put parameters and data in one equation, the paper proposes

$$
L(N, D)=\left[\left(\frac{N_c}{N}\right)^{\alpha_N/\alpha_D}+\frac{D_c}{D}\right]^{\alpha_D}
$$

Three principles select this form. (1) Changing the vocabulary or tokenization only rescales the loss by a constant, so $N_c$ and $D_c$ must be able to absorb it. (2) For $N\to\infty$ the loss must reduce to $L(D)$, and for $D\to\infty$ to $L(N)$. (3) The loss should be analytic at $D=\infty$, that is, expandable in integer powers of $1/D$. The paper admits that the third principle has the weakest theoretical support and rests mainly on how well the fit works. Fitting four parameters gives $\alpha_N=0.076$, $\alpha_D=0.103$, $N_c=6.4\times10^{13}$ and $D_c=1.8\times10^{13}$ (Table 2). $\alpha_D$ is 0.103 rather than 0.095 because here the whole surface is fitted at once. The runs with the dataset cut by a factor of 1,024 (about $2\times10^{7}$ tokens) are not fitted well; the paper notes that an epoch is then only 40 parameter updates, so overfitting starts extremely early and this may be a different regime.

The degree of overfitting depends only on the combination $N^{\alpha_N/\alpha_D}/D$ (Figure 9, right). The paper turns "trained to within 0.02 of the converged loss (about the variation between random seeds) without overfitting" into a lower bound on the data:

$$
D\gtrsim\left(5\times10^{3}\right)N^{0.74}
$$

Here $0.74\approx\alpha_N/\alpha_D$, using the joint fit $\alpha_D=0.103$. Data only has to grow **sub-linearly** with model size:

```python
# Data needed to avoid overfitting: D >= 5e3 * N**0.74
for n in (1e8, 1e9, 1e10):
    d = 5e3 * n ** 0.74
    print(f"N = {n:.0e}: D >= {d:.1e} tokens ({d / n:.1f} per parameter)")
print(f"8x the parameters -> {8 ** 0.74:.2f}x the data")
```

Output:

```text
N = 1e+08: D >= 4.2e+09 tokens (41.6 per parameter)
N = 1e+09: D >= 2.3e+10 tokens (22.9 per parameter)
N = 1e+10: D >= 1.3e+11 tokens (12.6 per parameter)
8x the parameters -> 4.66x the data
```

An 8-fold larger model needs only about 4.7 times as much data. From this the paper infers that models below $10^9$ parameters can be trained with minimal overfitting on the 22-billion-token WebText2, while the largest models will see mild overfitting.

This is "the data needed to **avoid overfitting**", not "the compute-optimal ratio", and the paper says explicitly that the two usually differ. It also did not optimize regularization (for example the dropout probability) while varying $N$ and $D$. Note that the tokens per parameter implied by this bound fall as the model grows (41.6, 22.9, 12.6), whereas Chinchilla's "about 20 tokens per parameter" is a ratio that stays roughly constant across scales. The two answer different questions, and the similar numbers near $N=10^9$ mean nothing.

## Finding 4: training steps and the critical batch size

The third variable is training time. For a fixed model size and unlimited data, the learning curve after an initial transient can be fitted jointly in $N$ and the number of steps:

$$
L(N,S_{\min})=\left(\frac{N_c}{N}\right)^{\alpha_N}+\left(\frac{S_c}{S_{\min}}\right)^{\alpha_S}
$$

The fitted values are $\alpha_N=0.077$, $\alpha_S=0.76$, $N_c=6.5\times10^{13}$ and $S_c=2.1\times10^{3}$ (Table 3). The first term is the loss floor set by model size, and the second falls with the number of steps. $S_{\min}$ needs some explanation.

Most of the paper's runs use a fixed batch size ($2^{19}$ tokens), but for a given target loss a batch that is too large wastes compute (it takes few steps), and one that is too small wastes steps (it saves compute). The paper borrows the **critical batch size** theory of McCandlish et al. (2018): training to a given loss takes $S$ steps and processes $E=BS$ samples, and these satisfy $(S/S_{\min}-1)(E/E_{\min}-1)=1$, where $S_{\min}$ is the fewest steps needed with a very large batch and $E_{\min}$ the fewest samples needed with a very small batch. Their ratio is the critical batch size, $B_{\mathrm{crit}}=E_{\min}/S_{\min}$. At $B=B_{\mathrm{crit}}$ both the number of steps and the number of samples are twice their minimum, a roughly optimal compromise between time and compute. Given $B_{\mathrm{crit}}(L)$, steps and compute at any batch size can be converted to the standardized $S_{\min}$ and $C_{\min}$:

$$
S_{\min}=\frac{S}{1+B_{\mathrm{crit}}(L)/B},\qquad
C_{\min}=\frac{C}{1+B/B_{\mathrm{crit}}(L)}
$$

The paper measures the critical batch size to depend only on the loss reached, not on model size: $B_{\mathrm{crit}}(L)\approx B_*/L^{1/\alpha_B}$ with $B_*\approx2\times10^{8}$ tokens and $\alpha_B\approx0.21$. The lower the loss, the larger the critical batch, which roughly doubles for every 13% drop in loss (Figure 10).

```python
aB, Bstar = 0.21, 2e8  # B_crit(L) = B* / L**(1/aB), in tokens

for loss in (4.5, 3.5, 3.0, 2.5):
    print(f"L = {loss}: Bcrit = {Bstar / loss ** (1 / aB):.2e} tokens")
print(f"batch 2^19 tokens is critical at L = {(Bstar / 2 ** 19) ** aB:.2f}")
print(f"13% lower loss -> Bcrit x{0.87 ** (-1 / aB):.2f}")
```

Output:

```text
L = 4.5: Bcrit = 1.55e+05 tokens
L = 3.5: Bcrit = 5.13e+05 tokens
L = 3.0: Bcrit = 1.07e+06 tokens
L = 2.5: Bcrit = 2.55e+06 tokens
batch 2^19 tokens is critical at L = 3.48
13% lower loss -> Bcrit x1.94
```

The last two lines follow from the paper's fit: the default batch of $2^{19}$ tokens is the critical batch size at a loss of about 3.5 nats. Early in training, above 3.5, this batch is larger than critical and wastes compute; below 3.5 it is smaller than critical, which saves compute but takes more steps. That is why the paper converts to $S_{\min}$ and $C_{\min}$ instead of using the actual steps and compute.

## Finding 5: where to spend a fixed compute budget

Substituting $S_{\min}=C_{\min}/(6NB_{\mathrm{crit}})$ into $L(N,S_{\min})$ and minimizing over $N$ gives how the optimal configuration grows with compute (Section 6.2 and Appendix B):

$$
N\propto C_{\min}^{\alpha_C^{\min}/\alpha_N},\qquad
B\propto C_{\min}^{\alpha_C^{\min}/\alpha_B},\qquad
S\propto C_{\min}^{\alpha_C^{\min}/\alpha_S},\qquad
D=B\cdot S
$$

with $\alpha_C^{\min}=1/(1/\alpha_S+1/\alpha_B+1/\alpha_N)$. The theory predicts about 0.054 and $N\propto C_{\min}^{0.71}$. The direct measurements are $\alpha_C^{\min}\approx0.050$, $N\propto C_{\min}^{0.73}$, $B\propto C_{\min}^{0.24}$ and $S\propto C_{\min}^{0.03}$ (Figures 13 and 14), and the paper says the two agree to within a few percent. The step exponent is so small that, in the paper's words, it may even be consistent with zero. Converting the exponents into multiplicative factors:

```python
# Optimal allocation vs compute: N~C^0.73, B~C^0.24, S~C^0.03, D = B*S ~ C^0.27
for name, e in (("N", 0.73), ("B", 0.24), ("S", 0.03), ("D", 0.27)):
    print(f"{name}: x{10 ** e:.2f} per 10x compute, "
          f"x{10 ** (9 * e):.3g} per 1e9x")
```

Output:

```text
N: x5.37 per 10x compute, x3.72e+06 per 1e9x
B: x1.74 per 10x compute, x145 per 1e9x
S: x1.07 per 10x compute, x1.86 per 1e9x
D: x1.86 per 10x compute, x269 per 1e9x
```

Every 10× of compute should make the optimal model about 5.4 times larger and the data only about 1.9 times larger, and most of the extra data goes into a bigger batch, so the number of serial steps barely changes. Figure 3 of the paper illustrates a billion-fold increase in compute: the model grows by more than a million, the batch by about 100 and the serial steps by less than 10, matching the output above. A few readings:

- **Extra compute goes mainly into the model.** This is the most actionable point of the paper: rather than doubling the data, make the model several times larger and let the data grow slowly.
- **Large models are more sample-efficient.** To reach the same loss, a larger model needs to process fewer tokens (Figure 2, left), and compute-efficient training stops far short of convergence (Figure 2, right).
- **The optimum is not sharp.** A model between 0.6 and 2.2 times the optimal size needs only about 20% more compute (Figure 12), so a small deviation from the optimal size costs little. The paper adds that, because of hardware constraints, researchers typically train smaller models for longer than is compute-optimal.
- **Steps grow extremely slowly.** Since $S_{\min}\propto C_{\min}^{0.03}$, the paper suggests that work on speeding up early training is worthwhile, because compute-efficient training needs very few optimization steps.

## The contradiction the paper points out

In Section 6.3 the paper extrapolates and concludes that its own power laws must fail somewhere. The argument has three steps:

1. To avoid overfitting, the data must grow with the model: $D\propto N^{0.74}\propto C_{\min}^{0.54}$ (Equation 6.6).
2. But compute-efficient training uses data that grows slowly. Training at the critical batch size and seeing each token once, the amount of data is $D(C_{\min})=2C_{\min}/\bigl(6N(C_{\min})\bigr)\approx4\times10^{10}\,(C_{\min}/\text{PF-day})^{0.26}$ tokens (Equation 6.7), growing much more slowly than step 1 requires.
3. So at large enough compute, even a single pass without repeating data runs into the data bottleneck. With $L(D)\propto D^{-0.095}$, the loss would then fall with compute only as $C_{\min}^{-0.03}$, while $L(C_{\min})$ predicts $C_{\min}^{-0.050}$, and the two curves must cross.

The crossing is at $C^*\sim10^{4}$ PF-days, $N^*\sim10^{12}$ parameters, $D^*\sim10^{12}$ tokens and $L^*\sim1.7$ nats per token (Equation 6.8). The paper stresses that these values are very uncertain and could be off by an order of magnitude in either direction, depending on the fitted exponents. It offers two readings. The most obvious is that the laws must break down before this point. The other is explicitly labeled a **conjecture**: the crossing may have a deeper meaning, with $L^*$ a rough estimate of the entropy per token of natural language, and the trend leveling off near it. The crossing was computed with Kaplan et al.'s own allocation exponents, which were later corrected (next section), so its values should no longer be taken as an estimate. It is better used as an example of why an extrapolation needs a boundary.

## What came after: which conclusions were corrected

The most important correction concerns the allocation exponent. Hoffmann et al. (2022, Chinchilla) refit it with more than 400 models, and their three methods give exponents $a$ in $N_{opt}\propto C^{a}$ of 0.50, 0.49 and 0.46, against 0.73 for Kaplan et al. They also ran a direct comparison: at $10^{21}$ FLOPs the Kaplan fit gives 4.68 billion parameters and Chinchilla's method 2.86 billion; they trained models of 4.74 and 2.80 billion parameters, and the smaller one ended with the lower loss. The first number can be reproduced from the paper's formula:

```python
import math

PF_DAY = 1e15 * 24 * 3600  # FLOPs in one PF-day

for c in (1e21, 6 * 175e9 * 300e9):  # 1e21: Chinchilla's test; GPT-3 by 6ND
    n_kaplan = 1.3e9 * (c / PF_DAY / 2) ** 0.73  # C = 2 * Cmin at B_crit
    n_chin = math.sqrt(c / 120)  # D = 20N and C = 6ND
    print(f"C = {c:.2e}: Kaplan N = {n_kaplan:.2e}, "
          f"20 tokens/param N = {n_chin:.2e}")
```

Output:

```text
C = 1.00e+21: Kaplan N = 4.68e+09, 20 tokens/param N = 2.89e+09
C = 3.15e+23: Kaplan N = 3.12e+11, 20 tokens/param N = 5.12e+10
```

The $4.68\times10^{9}$ in the first line is exactly the Kaplan prediction quoted in the appendix of the Chinchilla paper, and the "20 tokens per parameter" rule gives 2.89 billion, close to Chinchilla's own fitted 2.86 billion. The second line takes GPT-3 (175 billion parameters, 300 billion tokens) and estimates its training compute as $6ND\approx3.15\times10^{23}$ FLOPs, or 3,646 PF-days. The Kaplan fit then gives about 310 billion parameters and the 20-tokens-per-parameter rule about 51 billion. The second line extrapolates the paper's fit by more than three orders of magnitude (the paper's compute curves stop at about 1 PF-day). It only shows how far the two exponents drift apart, and it is not a judgment on GPT-3.

The Chinchilla paper gives two reasons. Kaplan et al. used the same token count (the end of the cosine schedule, about 130 billion tokens) and the same learning-rate schedule for all models, which overestimates the loss of models trained on fewer tokens and so underestimates the benefit of small models on little data. And most of Kaplan's experimental models were much smaller (many under 100 million parameters), while most of Chinchilla's had more than 500 million, with the FLOPs-loss frontier showing slight curvature at larger scales.

Porian et al. (2024) went further with more than 900 training runs (Llama-style models on RefinedWeb, repeated on OpenWebText2). They traced the disagreement to three concrete factors and found that the learning-rate decay conjectured in the Chinchilla paper is not essential. The table is their Figure 1, where $a$ is the fitted exponent in $N^{\star}\propto C^{a}$ and the last column is the optimal parameter count at Chinchilla's compute budget of $5.88\times10^{23}$ FLOPs:

| Setting | $a$ | Optimal size |
| --- | --- | --- |
| (a) Reproduce Kaplan et al.'s setup | 0.835 | about 3T |
| (b) Count the FLOPs of the output layer (the decoding head) | 0.706 | about 787B |
| (c) On top of (b), make the warmup length in tokens comparable to the model size $N$ | 0.602 | about 292B |
| (d) On top of (c), use a cosine learning-rate decay matched to the token budget | 0.571 | about 183B |
| (e) On top of (c), set the learning rate, batch size and AdamW $\beta_2$ separately for each size, with a constant learning rate | 0.497 | about 77B |

The three factors are:

- **Compute of the output layer.** Kaplan et al.'s compute convention leaves out the output layer (perhaps because it shares weights with the embedding). Porian et al. show that the resulting underestimate of the per-token compute grows from roughly 10% for large models to roughly 90% for small ones.
- **Warmup length.** Kaplan et al.'s fixed 3,000 warmup steps (about 1.57 billion tokens) are too long for small models: their optimal token count is below or close to the warmup tokens, so they are "forced" to use more tokens than optimal. That inflates the optimal token count at small compute and with it the exponent.
- **Retuning the optimizer with scale.** The fixed batch size of $2^{19}$ tokens leaves small models only a few hundred steps. With the learning rate, batch size and $\beta_2$ set per size, the exponent returns to about 0.5, matching Chinchilla.

From (c) to (d) the exponent drops by only about 0.03, so learning-rate decay matters little; (e) uses no decay at all and still reaches 0.497, so a constant learning rate with per-size tuning is enough to reproduce Chinchilla's allocation. These numbers come from Porian et al.'s own setup and are not a re-analysis of Kaplan's original data. They show which factor moves the exponent by how much.

One more point is worth remembering. Both Chinchilla and Porian et al. observe that the curve of optimal loss against compute bends slightly, closer to a saturating power law than to Kaplan's pure power law. Chinchilla's parametric loss $E+A/N^{\alpha}+B/D^{\beta}$ adds an irreducible-loss term $E$ that Kaplan's form does not have.

## Reading the numbers with care

- **The constants have no fundamental meaning.** $N_c$, $D_c$ and $C_c^{\min}$ depend on the tokenizer and the dataset, as the paper says itself. With another vocabulary the absolute loss values are not comparable.
- **The paper has small internal inconsistencies.** Section 1.2 gives $C_c^{\min}\approx3.1\times10^{8}$ PF-days while the fit label in Figure 13 reads $2.3\times10^{8}$. The theoretical 0.054 and 0.71 differ slightly from the measured 0.050 and 0.73. The data exponent is 0.26 in Equation 6.7 and $0.24+0.03=0.27$ when composed as $B\cdot S$. These come from fitting and rounding and do not change the conclusions, but when quoting, say which equation you used.
- **The coverage is limited.** The compute curve stops at about 1 PF-day, the largest model has 1.5 billion parameters and the largest dataset 23 billion tokens. For today's models every use of the formulas is an extrapolation.
- **One dataset and one architecture family.** The results come from WebText2 and decoder-only Transformers. They say nothing about mixture-of-experts models, long context or more elaborate data mixtures.
- **It studies pretraining loss.** The paper does not evaluate downstream ability, and what a given drop in loss means for capabilities needs separate evidence.

## What to take away

1. **The method matters more than the constants.** Measure a smooth trend at small scale, then plan with the fitted formula. That is what the paper leaves behind, while the specific 0.73 has been corrected.
2. **Know your bottleneck.** Parameters, data, compute, batch size and steps each follow a different law when they are the limiting factor. Work out which regime you are in before applying a formula.
3. **Conclusions depend on experimental details.** Seemingly minor choices such as warmup length, batch size, learning rate and the compute convention can move the allocation exponent from 0.5 to 0.83. Check each of them when you design your own scaling-law experiments.
4. **Extrapolation needs a boundary.** The authors themselves point out where the extrapolation contradicts itself. Using a fitted formula far outside the range of the experiments calls for a safety margin and continued checking.

## Further reading

- Kaplan et al., [Scaling Laws for Neural Language Models](https://arxiv.org/abs/2001.08361) (2020): the source of every number here.
- Hoffmann et al., [Training Compute-Optimal Large Language Models](https://arxiv.org/abs/2203.15556) (2022, Chinchilla): refits the optimal allocation.
- Porian et al., [Resolving Discrepancies in Compute-Optimal Scaling of Language Models](https://arxiv.org/abs/2406.19146) (NeurIPS 2024): traces the disagreement between the two studies.
- McCandlish et al., [An Empirical Model of Large-Batch Training](https://arxiv.org/abs/1812.06162) (2018): the critical batch size.
- Wiki: [Scaling Laws](https://dmxsf.com/en/wiki/pretraining/scaling-laws/) (Chinchilla's formulas and an interactive calculator), [The Compute and Memory Ledger of Training](https://dmxsf.com/en/wiki/pretraining/compute-and-memory/) (where $6ND$ comes from), [The LLM Training Pipeline](https://dmxsf.com/en/wiki/pretraining/training-pipeline/).

## FAQ

### What is the main finding of the Scaling Laws paper?

Training Transformers with 768 to 1.5 billion non-embedding parameters on WebText2, the authors found that test loss falls as a power law in the parameter count N, the dataset size D and the optimally allocated compute C_min, with exponents of about 0.076, 0.095 and 0.050, and that for a fixed N the shape (depth, width) barely matters. At a fixed compute budget most of the extra compute should go into a bigger model (the optimal size grows roughly as compute to the power 0.73), while the data needs to grow only slowly (about the power 0.27).

### How much does the loss drop when the parameter count doubles?

With the paper's fit L(N) ∝ N^-0.076, doubling the parameters multiplies the loss by 2^-0.076 ≈ 0.949, a drop of only about 5%, and a tenfold increase gives about 0.839. For data the exponent is 0.095, so doubling multiplies the loss by about 0.936. These are fits on WebText2 when no other factor is the bottleneck, and they should not be carried over to other data or architectures as they are.

### Why does the paper count only non-embedding parameters?

Without the vocabulary and position embeddings, models of different depth fall on one trend line; with them the trend is scattered (Figure 6 of the paper). N is estimated as 12·n_layer·d_model². Porian et al. (2024) later pointed out that the same convention also left the output layer out of the paper's compute estimate, which matters most for small models and is one reason its conclusion differs from Chinchilla's.

### Why do Kaplan et al. and Chinchilla disagree?

Their fitted exponents for the optimal model size are about 0.73 and 0.5. The Chinchilla paper blames in part the fixed token count and learning-rate schedule that Kaplan et al. used for all models. Porian et al. (2024) traced the gap to three factors in their replication: compute that leaves out the output layer, a fixed-length learning-rate warmup that is too long for small models, and optimizer hyperparameters that were not retuned with scale. With those fixed they match Chinchilla, and learning-rate decay turned out to matter little.

### What is the critical batch size?

Up to the critical batch size, a larger batch costs almost no compute efficiency and cuts the number of steps proportionally; beyond it, returns diminish. The paper measures B_crit(L) ≈ 2×10⁸ / L^(1/0.21) tokens, which depends only on the loss reached and not on model size, and doubles for roughly every 13% drop in loss. Training at the critical batch size takes twice the minimum number of steps and twice the minimum number of samples.

### Can these power laws predict the loss of my own model directly?

Not directly. The fitted constants depend on the tokenizer and the dataset, and the paper itself says they have no fundamental meaning. The experiments reach only about 1 PF-day of compute and 1.5 billion parameters, and they study pretraining loss, not downstream ability. In practice you refit the laws with small models on your own data and architecture, then extrapolate with a safety margin.
