VerifiedarXiv:2203.1555624 min
Scaling · LLMs

Chinchilla: Training Compute-Optimal Large Language Models

At a fixed training budget, a smaller model trained on more text reaches a lower loss.

DeepMind trained over 400 language models to find how a compute budget should be split between parameters and training tokens. They found that both should grow at the same rate, about 20 tokens per parameter. A 70B model trained that way outperformed the 280B Gopher at the same cost.

Explaining the paperTraining Compute-Optimal Large Language ModelsHoffmann, Borgeaud, Mensch, Buchatskaya, Cai, Rutherford, et al., Sifre · DeepMind · NeurIPS 2022 · arXiv:2203.15556 ↗

GPT-3, Jurassic-1, Gopher and Megatron-Turing NLG were each trained on roughly 300 billion tokens. By this paper's analysis, Gopher's compute would have been better spent on a model a quarter of its size reading more than four times as much text.

In 2020, Kaplan and colleagues at OpenAI fit power laws to language-model loss (covered in the Scaling Laws explainer) and concluded that when the training budget grows, most of it should go into a larger model: the optimal parameter count grows as C0.73C^{0.73} and the optimal token count as C0.27C^{0.27}. By that rule a budget ten times larger buys a model 5.4 times larger and only 1.9 times more tokens. The largest models of the next two years were built that way:

ModelParametersTraining tokensTokens / parameter
GPT-3 (2020)175B300B1.7
Jurassic-1 (2021)178B300B1.7
Gopher (2021)280B300B1.1
MT-NLG (2022)530B270B0.5
Chinchilla (2022)70B1.4T20

The first four rows are from the paper's Table 1, including the GPT-3 row. Hoffmann et al. at DeepMind trained over 400 models, from 70 million to over 16 billion parameters on 5 to 500 billion tokens, and asked one question of them: for a fixed amount of training compute, which model size and token count give the lowest loss? Three different estimation methods gave the same answer, that parameters and tokens should grow in about equal proportion. They then tested it at full scale by training Chinchilla, the last row.

The page goes in this order: how compute is counted and why a fixed budget forces a trade; the three estimation methods (training-curve envelope, IsoFLOP profiles, a fitted loss formula) and the closed-form optimum the third one gives; why the earlier study got a different answer; the Chinchilla-against-Gopher test; and a 2024 replication which showed that the constants printed for the third method point to a different ratio than the paper's conclusion.

How training compute is counted

A training budget is measured in floating-point operations (FLOPs): the multiplies and adds the accelerators perform over the whole run. The paper uses the approximation from Kaplan et al. for a dense Transformer:

C≈6 N DC \approx 6\,N\,D
(1)

where CC is total training FLOPs, NN the number of parameters, and DD the number of training tokens (a token is a chunk of text, a word or a piece of one, as cut up by the tokenizer). The 6 comes from two passes over the network. In the forward pass each parameter takes part in one multiply-add per token (a weight multiplies an activation and the product is added into a running sum), which is 2 FLOPs, so one token costs about 2N2N FLOPs. The backward pass does two matrix products per layer where the forward pass did one: one computes the gradient of the loss with respect to that layer's weights, the other computes the gradient passed down to the layer below. That is about 4N4N FLOPs per token, and the run total is (2N+4N) D(2N + 4N)\,D.

For Gopher, 280B parameters on 300B tokens, (1) gives 6×280B×300B=5.04×10236 \times 280\text{B} \times 300\text{B} = 5.04\times10^{23}. For Chinchilla, 70B on 1.4T tokens, it gives 5.88×10235.88\times10^{23}. The Gopher paper reported its training compute as 5.76×10235.76\times10^{23}, and that is the budget the Chinchilla paper holds fixed throughout. The paper's Appendix F also counts every term separately (embeddings, attention including the terms that grow with the square of the sequence length, the dense blocks, the output logits), which puts Gopher at 6.3×10236.3\times10^{23}; for models from 73M to 6.8B parameters that full count comes out between 0.99 and 1.10 times 6ND6ND. (1) leaves out attention's sequence-length terms, which are small at these model widths.

The two buttons in Figure 1 load Gopher and Chinchilla. The bar splits the total into its forward and backward parts, and the line under the total gives it as a multiple of the 5.76×10235.76\times10^{23} budget:

Figure 1 · the compute budget
70B
1.4T
Training compute is 2ND for the forward pass plus 4ND for the backward pass, 6ND6ND in total. Load the two presets, then drag either slider: a large model on few tokens and a small model on many tokens can land on the same budget.
# training compute, the paper's approximation (App. F checks it)
def train_flops(N, D):        # N parameters, D training tokens
    fwd = 2 * N * D           # one multiply-add per parameter per token
    bwd = 2 * fwd             # backward pass ~ twice the forward
    return fwd + bwd          # = 6 * N * D

train_flops(70e9, 1.4e12)     # Chinchilla -> 5.88e23
train_flops(280e9, 300e9)     # Gopher     -> 5.04e23 (reported: 5.76e23)

A fixed budget forces a trade between model size and data

Once the budget is fixed, (1) fixes the product NDN D, so choosing a model size also chooses the token count:

D=C6 ND = \frac{C}{6\,N}
(2)

The paper's Appendix D.4 runs this choice at 102110^{21} FLOPs. Kaplan's rule recommends a 4.74B model there, which by (2) can read 35.2B tokens, about 7 per parameter. Approach 1 of this paper recommends 2.80B, which reads 59.5B tokens, about 21 per parameter. The authors trained both, and the 2.80B model ended with the lower loss.

The two ends of the range fail in different ways. A model much too small for its budget reads an enormous corpus but has too few parameters to fit it, so its loss flattens out well above what a larger model reaches. A model much too large reads so few tokens that training ends while its loss is still falling steeply. Between the two sits one size with the lowest final loss for that budget, which the paper calls compute-optimal and estimates in three ways.

All three use the same Transformer family, the same corpus (MassiveText, Gopher's training data), and cosine learning-rate schedules that lower the rate by 10× over the planned length of a run. How that length is chosen matters for the comparison with Kaplan's result further down.

Approach 1: the lowest training curve at each budget

The first method reuses training curves. The authors fix a set of model sizes from 70M to over 10B parameters and train each size four times, with cosine schedules whose lengths span a factor of 16. Plot each run's loss against the FLOPs spent so far (6N6N times the tokens read) and each size traces a falling curve. At any FLOP count, the lowest curve is the best loss that much compute could buy, and its model size is the compute-optimal size for that budget. The paper smooths and interpolates every curve, repeats the selection at 1500 log-spaced FLOP values, and fits power laws to the winning sizes and token counts.

Figure 2 draws seven sizes across that range. Move the budget line, with the slider or the pointer, and read off which curve is lowest. Small models win at small budgets; each larger model takes over once the budget gives it enough tokens to get below the smaller ones:

Figure 2 · the training-curve envelope
3.2e20
Seven curves, one per model size from 70M to 10B. The dashed amber envelope follows the lowest curve at each FLOP count, and the header reports the winning size and its tokens. The curves come from the re-fitted loss formula (4), evaluated as if each point were a run whose schedule ended there; they are not the paper's runs.

With only seven sizes the winner changes in steps, so its tokens-per-parameter readout jumps between about 9 and 65 as the line moves. The paper's power-law fit over many sizes and 1500 budgets smooths those steps out and gives Nopt∝C0.50N_{\text{opt}} \propto C^{0.50} and Dopt∝C0.50D_{\text{opt}} \propto C^{0.50}. Every point the selection picked lies in the last 15% of its run's schedule, which the authors turn into practical advice: set the cosine cycle to decay over about the number of tokens the model will actually be trained on.

Approach 2: IsoFLOP profiles

The second method fixes the budget first. For each of 9 budgets from 6×10186\times10^{18} to 3×10213\times10^{21} FLOPs, the authors train a family of model sizes, each for the token count (2) allows and with its cosine schedule set to that token count, and record only the final loss of each run. The name IsoFLOP means equal FLOPs: every run in one family cost the same. Plotted against model size, each family forms a valley, with the too-small models on the left and the too-large ones on the right. The paper fits a parabola to each valley and takes its minimum as the compute-optimal size for that budget.

In Figure 3 the budget slider picks one of nine valleys. The amber dots mark the minimum of each, and the readout in the corner gives the tokens-per-parameter ratio at the highlighted one:

Figure 3 · IsoFLOP valleys
1.9e21 FLOPs
Each curve holds compute fixed and varies model size. The bottom of each valley is the compute-optimal size for that budget. As the budget grows the valley moves right, and the ratio at its bottom stays near 20 tokens per parameter.

Fitting the minima across budgets gives two power laws,

Nopt∝Ca,Dopt∝CbN_{\text{opt}} \propto C^{a}, \qquad D_{\text{opt}} \propto C^{b}
(3)

with a=0.49a = 0.49 and b=0.51b = 0.51. With both exponents near one half, 100 times more compute means about 10 times more parameters and 10 times more tokens. Kaplan's exponents turn the same 100× into 29× more parameters and 3.5× more tokens. Extrapolated to Gopher's budget, the IsoFLOP fit projects an optimal size of 63B.

Approach 3: a formula for the whole loss surface

The third method models the final loss of every run from Approaches 1 and 2 at once, as a function of both model size and token count:

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

The paper gives each term a meaning. EE is the loss of an ideal model of the text, which the paper equates with the entropy of natural text: no model size or amount of data goes below it. A/NαA/N^{\alpha} is how far a perfectly trained Transformer with NN parameters falls short of that ideal; it shrinks as NN grows, at a rate set by α\alpha. B/DβB/D^{\beta} is the extra loss from stopping after DD tokens instead of training to convergence; it shrinks with more data at a rate set by β\beta.

The fit minimizes a Huber loss (squared error for small residuals, absolute error for large ones, with threshold δ=10−3\delta = 10^{-3}) between predicted and observed log loss, using the L-BFGS optimizer from a grid of starting points. The Huber loss keeps a few badly fitting runs from dragging the fit; in practice the smallest runs, at C≤1021C \le 10^{21} FLOPs, have the largest residuals and are treated as outliers. The paper reports

E=1.69,A=406.4,B=410.7,α=0.34,β=0.28E = 1.69, \quad A = 406.4, \quad B = 410.7, \quad \alpha = 0.34, \quad \beta = 0.28E=1.69,A=406.4,B=410.7,α=0.34,β=0.28\begin{gathered} E = 1.69, \quad A = 406.4, \quad B = 410.7, \\ \alpha = 0.34, \quad \beta = 0.28 \end{gathered}
(5)

As a worked example, put Chinchilla and Gopher into (4) with these constants. Chinchilla (70B, 1.4T) gets 1.69+0.083+0.163=1.941.69 + 0.083 + 0.163 = 1.94. Gopher (280B, 300B) gets 1.69+0.052+0.251=1.991.69 + 0.052 + 0.251 = 1.99. Gopher's four-times-larger size lowers the parameter term by 0.031, and its 300B tokens raise the data term by 0.088, so at about the same compute the smaller model is predicted to reach the lower loss.

The formula also gives the compute-optimal split in closed form. Substitute (2) into (4): the data term becomes B (6N/C)βB\,(6N/C)^{\beta}, which grows with NN, while the parameter term shrinks with it. Differentiate in NN and set the result to zero:

dL^dN=−αANα+1+βBN(6NC)β=0⟹α ANα=β BDβ\begin{gathered}\frac{d\hat L}{dN} = -\frac{\alpha A}{N^{\alpha+1}} + \frac{\beta B}{N}\left(\frac{6N}{C}\right)^{\beta} = 0 \\ \Longrightarrow\quad \alpha\,\frac{A}{N^{\alpha}} = \beta\,\frac{B}{D^{\beta}}\end{gathered}

The condition on the right has a direct reading. Increasing ln⁡N\ln N by a small amount lowers the parameter term by α\alpha times its current value per unit of ln⁡N\ln N, and because NDND is fixed the same move lowers ln⁡D\ln D by the same amount, raising the data term by β\beta times its value per unit. The best split sets those two rates equal. Solving for NN gives Nα+β=αAβB (C/6)βN^{\alpha+\beta} = \frac{\alpha A}{\beta B}\,(C/6)^{\beta}, which is the paper's Eq. (4):

Nopt(C)=G(C6)a,Dopt(C)=G−1(C6)bG=(αAβB)1α+β,a=βα+β,b=αα+β\begin{gathered}N_{\text{opt}}(C) = G\left(\frac{C}{6}\right)^{a},\qquad D_{\text{opt}}(C) = G^{-1}\left(\frac{C}{6}\right)^{b} \\ G = \left(\frac{\alpha A}{\beta B}\right)^{\frac{1}{\alpha+\beta}},\qquad a = \frac{\beta}{\alpha+\beta},\qquad b = \frac{\alpha}{\alpha+\beta}\end{gathered}
(6)

The exponent on model size, aa, comes from the data exponent β\beta, and vice versa. They always sum to one, because NoptDoptN_{\text{opt}} D_{\text{opt}} has to equal C/6C/6, and they are equal exactly when α=β\alpha = \beta: when an extra doubling of parameters and an extra doubling of tokens reduce loss at the same rate, the budget goes to both equally. With the printed α=0.34\alpha = 0.34 and β=0.28\beta = 0.28, a=0.28/0.62=0.45a = 0.28/0.62 = 0.45 (the paper's Table 2 lists 0.46, from the unrounded fit) and b=0.55b = 0.55.

Figure 4 draws the surface (4) over the plane of model size and tokens, in log-log axes, using the constants of a 2024 re-fit by Epoch AI instead of the printed ones; the section on the constants explains why. Each faint diagonal is one budget, because ND=C/6ND = C/6 is a straight line of slope −1 in these axes. The amber line is the compute-optimal frontier (6). The last slider stop is Gopher's budget, with rings on Chinchilla and Gopher:

Figure 4 · the loss surface and the frontier
1.0e22 FLOPs
The fitted loss over model size and tokens; brighter teal is lower loss. The highlighted diagonal is the selected budget and the amber frontier joins the lowest-loss point of every budget. At the last stop, 5.76×10235.76\times10^{23} FLOPs, Chinchilla sits next to the optimum and Gopher sits far down the same diagonal, toward more parameters and fewer tokens.

The frontier is a straight line of slope about one: under the re-fit, a=0.513a = 0.513 and b=0.487b = 0.487, so every doubling of parameters on the frontier comes with slightly less than a doubling of tokens. At Gopher's budget, (6) with the re-fit constants gives 72B parameters and 1.33T tokens, and the balance condition checks out at Chinchilla itself: αA/Nα=0.028\alpha A/N^{\alpha} = 0.028 and βB/Dβ=0.027\beta B/D^{\beta} = 0.027. The listing below computes the same optimum:

# compute-optimal split for a budget C, from the fitted loss (4)
E, A, B, alpha, beta = 1.8172, 482.01, 2085.43, 0.3478, 0.3658  # Epoch re-fit

def loss(N, D):
    return E + A / N**alpha + B / D**beta

def optimal_split(C):
    # closed form (6)
    G = (alpha * A / (beta * B)) ** (1 / (alpha + beta))
    N = G * (C / 6) ** (beta / (alpha + beta))
    D = (C / 6) ** (alpha / (alpha + beta)) / G
    return N, D

N, D = optimal_split(5.76e23)   # Gopher's budget
# N ~ 7.2e10, D ~ 1.33e12, D / N ~ 18, loss(N, D) ~ 1.97
# brute-force check: scan N, set D = C / (6N), keep the lowest loss

Why compute-optimal training uses about 20 tokens per parameter

The paper's Table 2 puts the three estimates next to Kaplan's:

Approacha (size)b (tokens)Optimum at Gopher's budget
1. Training-curve envelope0.500.5067B, 1.5T tokens
2. IsoFLOP profiles0.490.5163B
3. Parametric fit0.460.5440B
Kaplan et al. (2020)0.730.27

The ratio of 20 tokens per parameter is a reading of the paper's Table 3 (projections from Approach 1), not a phrase the paper prints: 1B parameters go with 20.2B tokens, 10B with 205.1B, and 67B with 1.5T. Chinchilla, at 70B and 1.4T, is exactly 20.

Combined with (1), the ratio gives a rule for sizing a run. Setting D=20ND = 20N in C=6NDC = 6ND gives C=120N2C = 120N^2, so

Nopt≈C/120,Dopt≈20 NoptN_{\text{opt}} \approx \sqrt{C/120}, \qquad D_{\text{opt}} \approx 20\,N_{\text{opt}}

At Gopher's 5.76×10235.76\times10^{23} FLOPs this gives 69B parameters and 1.39T tokens. At 102110^{21} FLOPs it gives 2.9B parameters and 58B tokens, close to the 2.80B model of the head-to-head comparison above.

Figure 5 starts both rules from the same compute-optimal model, 400M parameters on 8B tokens, and multiplies the budget. The number under each pair of bars is its tokens per parameter:

Figure 5 · two ways to spend more compute
1k×
Drag the multiplier. Under Kaplan parameters grow as C0.73C^{0.73} and tokens as C0.27C^{0.27}, so the ratio falls below one token per parameter by 1000× the budget. Under Chinchilla both grow as C0.5C^{0.5} and the ratio stays at 20.

The paper names two reasons Kaplan et al. reached a different answer. The first is the learning-rate schedule. Kaplan et al. trained their models with one fixed cosine schedule to 130B tokens and used losses read partway through those runs as stand-ins for shorter training runs. A cosine schedule lowers the learning rate gradually over the planned run, and a large share of the loss reduction happens late, as the rate approaches its minimum. A run stopped at 20B tokens of a 130B-token schedule still has a high learning rate, so its loss is higher than that of a run whose schedule was set to end at 20B. The overestimate is largest for the shortest horizons, which makes training on fewer tokens look less effective than it is and, in the paper's words, “contributes to the conclusion” that model size should grow faster than data.

Figure 6 · the schedule artifact
Δ ≈ 0.38
A schematic, not paper data. The same model under a cosine schedule matched to its horizon decays fully and ends lower; read mid-way through a schedule set for a much longer run, its loss is higher. Drag the measurement point: the gap is widest at short horizons and closes at the long schedule's end.

The second reason is the range of model sizes. The frontier of best loss per FLOP bends slightly as models grow (the paper's Appendix E), so fits to small models extrapolate differently from fits to large ones. Most of Kaplan's runs were small, many under 100M parameters; most of the Chinchilla runs have more than 500M, and they go up to 16B.

Chinchilla against Gopher at the same compute

The three approaches put the optimal model for Gopher's 5.76×10235.76\times10^{23} FLOPs between 40B and 70B parameters. The authors trained a model at the larger end: 70B parameters on 1.4T tokens. By (1) that is 5.88×10235.88\times10^{23} FLOPs against 6ND's 5.04×10235.04\times10^{23} for Gopher, the same budget to within the accuracy of the approximation, split the other way: a quarter of the parameters and about 4.7 times the tokens (1.4T / 300B; the paper rounds to 4×). Both models have 80 layers, so the size difference is in the width:

GopherChinchilla
Parameters280B70B
Training tokens300B1.4T
Layers8080
d_model16,3848,192
Heads × key/value size128 × 12864 × 128
Batch (tokens)3M → 6M1.5M → 3M
Max learning rate4 × 10⁻⁵1 × 10⁻⁴
OptimizerAdamAdamW

Halving dmodeld_\text{model} divides the weight matrices by four. A Transformer layer holds about 12 dmodel212\,d_\text{model}^2 weights (four d×dd \times d attention projections and a feed-forward block of width 4d4d), so 80 layers give about 258B for Gopher and 64B for Chinchilla, before embeddings.

The split is not the only change. Chinchilla uses AdamW instead of Adam, a tokenizer that skips NFKC unicode normalisation (94.15% of its vocabulary is shared with Gopher's), a float32 copy of the weights in the sharded optimizer state (the scheme from ZeRO), and a slightly different mix of MassiveText subsets to supply the extra tokens. The paper's Appendix G trains 417M, 680M and 1.4B models with Adam and with AdamW, and AdamW ends with the better loss independent of the learning-rate schedule.

On the results: Chinchilla reaches 67.5% on MMLU, 57 tasks of multiple-choice exam questions on academic subjects, against Gopher's 60.0%, more than 7 points higher; it is better on 51 of the 57 tasks, equal on 2 and worse on 4. It has lower bits-per-byte than Gopher on every subset of the Pile evaluated, and a WikiText-103 perplexity of 7.16 against 7.75, though the authors caution that a model that read four times more text is more likely to have seen test documents during training. The abstract states that Chinchilla outperforms Gopher (280B), GPT-3 (175B), Jurassic-1 (178B) and Megatron-Turing NLG (530B) on a large range of downstream tasks; the conclusion scopes it as “nearly every measured evaluation task”.

The size difference also matters after training. Generating one token costs about 2N2N FLOPs in the forward pass, so Chinchilla needs about a quarter of Gopher's compute per generated token; the paper notes it uses substantially less compute for fine-tuning and inference.

The Approach 3 constants that do not reproduce the headline

In 2024 Besiroglu, Erdil, Barnett and You at Epoch AI reconstructed the data points from the paper's plots and re-fit (4). Their fit gives E=1.8172E = 1.8172, A=482.01A = 482.01, B=2085.43B = 2085.43, α=0.3478\alpha = 0.3478 and β=0.3658\beta = 0.3658, and through (6) it recommends about 20 tokens per parameter, in line with Approaches 1 and 2. The constants printed in (5) do not: Epoch summarizes the policy they imply as about 70 tokens per parameter, and at Gopher's budget (6) with the printed values gives 32B parameters and 93 tokens per parameter.

The ratio is this sensitive because of how (6) combines the constants. Dividing the two halves of (6) gives

DoptNopt=G−2(C6)α−βα+β\frac{D_{\text{opt}}}{N_{\text{opt}}} = G^{-2}\left(\frac{C}{6}\right)^{\frac{\alpha-\beta}{\alpha+\beta}}
(7)

The exponent depends on α−β\alpha - \beta, a difference between two numbers of similar size, and GG raises αA/(βB)\alpha A/(\beta B) to the power 1/(α+β)≈1.61/(\alpha+\beta) \approx 1.6 before (7) squares it. With the printed α=0.34\alpha = 0.34 and β=0.28\beta = 0.28 the exponent is +0.097, so the recommended ratio climbs with the budget, from 26 at 101810^{18} FLOPs to about 150 at 102610^{26}. Changing β\beta alone from 0.28 to 0.30 brings the ratio at Gopher's budget from 93 down to 19.

Two causes have been identified. The printed exponents are rounded: a comment in the paper's TeX source keeps the fit's raw output, with α=0.33917\alpha = 0.33917 and β=0.28491\beta = 0.28491. Those unrounded values give 40B parameters at Gopher's budget, the Approach 3 projection the paper reports, and a=0.457a = 0.457, the 0.46 in Table 2, but still 59 tokens per parameter. The rest of the gap, according to one of the paper's authors as reported in Epoch's updated paper, came from the fit itself: the Huber losses were averaged over data points instead of summed, a choice of loss scale that made L-BFGS stop before it converged. The same early stop explains the reported confidence interval for aa, 0.454 to 0.455. Epoch estimates that an interval that narrow would take over 600,000 training runs, where the paper had fewer than 500.

Figure 7 plots the recommended tokens per parameter against compute for the printed constants, the unrounded ones, and the re-fit. The β\beta slider changes only the printed data exponent; the rows under the plot give each set's optimum at Gopher's budget:

Figure 7 · what the fitted constants recommend
printed β=0.28032B × 3.0T · 93/param
unrounded (TeX)40B × 2.4T · 59/param
Epoch re-fit72B × 1.3T · 18/param
optimum at Gopher's budget, 5.76e23 FLOPs
0.280
Tokens per parameter at the optimum (7), for the printed constants (solid; the slider moves its β\beta), the unrounded TeX values (dashed) and the Epoch re-fit. The amber dots are Chinchilla and Gopher as trained. At β=0.34=α\beta = 0.34 = \alpha the printed curve goes flat near one token per parameter; past that it falls as compute grows.

The correction is confined to Approach 3's printed numbers. The conclusion that parameters and tokens should grow at about the same rate rests on Approaches 1 and 2, which do not use (4), and on Chinchilla outperforming Gopher. The paper itself remarks that Approach 3 predicts smaller optimal models than the other two. Both problems push in that direction: at Gopher's budget the printed constants give 32B, the unrounded ones 40B, and the re-fit 72B.

Limitations and later practice

The authors list the limits in their conclusion. There are only two comparable runs at large scale, Chinchilla and Gopher, and no tests at intermediate scales. The analysis assumes the frontier is a power law, yet they observe some concavity in log⁡Nopt\log N_{\text{opt}} at high compute, which suggests the optimal size of large models may still be overestimated, i.e. the best models at large budgets may be smaller still. Every run in the analysis trained on less than one epoch of its data, so the paper says nothing about repeating data. And a 20:1 ratio at large scale needs trillions of tokens, which makes collecting large, high-quality datasets central; the paper stresses that more data helps only when it is high quality.

Compute-optimal is a statement about training compute only. A model that will serve many requests can justify a smaller size trained on more tokens than 20 per parameter, paying more at training time to spend less per generated token. Sardana et al. (2024) add inference cost to the objective and get higher ratios, and LLaMA trained its 7B model on 1T tokens, about 150 per parameter.

Provenance Verified against primary literatureHow we verify
Hoffmann et al. (2022)The paper: 6ND budget (App. F), Approaches 1 to 3 (Sec. 3), Table 2 exponents, Table 3 projections, Eq. (2) loss form and App. D.2 constants, Chinchilla 70B / 1.4T against Gopher 280B / 300B (Sec. 4, Table 4). Page equation (4) is paper Eq. (2); page (6) is paper Eq. (4).
Paper TeX source (arXiv 2203.15556)A comment beside App. D.2 holds the unrounded fit: param_slope 0.33917, token_slope 0.28491, param_offset 6.00734, token_offset 6.01792, loss_offset 0.52672 (A, B, E are their exponentials: 406.4, 410.7, 1.69).
Kaplan et al. (2020)The earlier scaling law: N_opt proportional to C^0.73 and D_opt to C^0.27. Trained with one cosine schedule to 130B tokens and read shorter horizons off it; most runs under 100M parameters.
Rae et al. (2021), GopherThe 280B model trained on 300B tokens; reports 5.76e23 training FLOPs, the budget Chinchilla matches. The Chinchilla paper recounts it as 6.3e23; 6ND gives 5.04e23.
Besiroglu, Erdil, Barnett, You (2024)Epoch AI replication of Approach 3 from data reconstructed from the paper's plots. Re-fit E = 1.8172, A = 482.01, B = 2085.43, alpha = 0.3478, beta = 0.3658, used in Figures 2 to 5 and 7 here.
This page's arithmeticLoss values 1.94 / 1.99 (printed constants) and 1.97 / 2.00 (re-fit) for Chinchilla / Gopher, and the closed-form optima at 5.76e23 FLOPs (printed 32B and 93 tokens per parameter, unrounded 40B and 59, re-fit 72B and 18) are computed here from the constants above; the paper does not print them.
correctionThe Approach 3 constants the paper prints (E = 1.69, A = 406.4, B = 410.7, alpha = 0.34, beta = 0.28) do not reproduce its headline. Put into the closed-form optimum they recommend far more than 20 tokens per parameter: Epoch AI summarizes the implied policy as about 70, and at Gopher's budget this page computes 93 (32B parameters). That contradicts Approaches 1 and 2 and the 20:1 recipe used to train Chinchilla. Epoch's re-fit of the same functional form recovers about 20. Two causes are documented: the printed exponents are rounded (the TeX source has beta = 0.2849, and the ratio is very sensitive to beta), and, per the paper's authors as reported by Epoch, the L-BFGS fit stopped early because the Huber loss was averaged rather than summed, which also produced the reported confidence interval for a, (0.454, 0.455), which is far too narrow: Epoch estimates an interval that narrow would take over 600,000 runs, against fewer than 500 actually trained. The headline (grow parameters and tokens at about the same rate, about 20 tokens per parameter) stands on Approaches 1 and 2 and on the Chinchilla run. Equation (5) on this page shows the printed constants; every figure that draws the loss surface uses the re-fit ones.

Questions you might still have

?

If 20 tokens per parameter is optimal, why are many current models trained on far more?
Compute-optimal counts only training compute. Serving a model costs about 2N FLOPs per generated token, so a smaller model trained past 20:1 costs more to train than the compute-optimal model of the same quality but less every time it runs. Sardana et al. (2024) add inference to the objective and get higher ratios when a model will serve many requests. LLaMA, covered in its own explainer, trained its 7B model on 1 trillion tokens, about 150 per parameter.

?

Where does the 6 in C = 6ND come from?
The forward pass does one multiply and one add per parameter per token, 2N FLOPs per token. The backward pass does two matrix products per layer, one for the weight gradient and one for the gradient passed to the layer below, about 4N. The sum is 6N per token. It leaves out attention terms that grow with sequence length; the paper's full count for models from 73M to 6.8B parameters is 0.99 to 1.10 times 6ND.

?

Is 20 tokens per parameter a constant of nature?
No. It is a reading of this paper's fits for dense Transformers trained on MassiveText for less than one epoch. Under the re-fitted formula the ratio drifts slowly with budget, from about 26 at 1e18 FLOPs to about 16 at 1e26, and the paper's Appendix E sees curvature that points to even smaller models at large budgets. A different dataset, tokenizer or architecture can move it.

?

Did Chinchilla beat Gopher only because of the size-to-data split?
Not purely. Chinchilla also used AdamW instead of Adam, a tokenizer without NFKC normalisation, a float32 copy of the weights in the optimizer state, and a slightly different mix of MassiveText subsets. The paper's Appendix G finds AdamW beats Adam on models from 417M to 1.4B parameters, so some of the gain comes from those changes; the paper does not measure their share at 70B. The size-to-data split is the change its three scaling analyses predicted would help.

?

Does the parametric formula reproduce the 20-to-1 rule?
Not with the constants the paper printed. They imply several times more tokens per parameter, about 93 at Gopher's budget. The Epoch AI re-fit of the same formula gives about 20. The formula's shape is fine; the printed numbers are rounded and came from an optimizer that stopped early.

?

What happens if there are not enough tokens for a 20:1 run?
The paper cannot say: every run in its analysis saw less than one epoch of its data. Training on repeated data is a different regime that the authors list as future work.

Footnotes & further reading

  1. The paper: Hoffmann, Borgeaud, Mensch, Buchatskaya, Cai, Rutherford, et al., Training Compute-Optimal Large Language Models (DeepMind, NeurIPS 2022). The unrounded Approach 3 constants are in a comment in the arXiv TeX source.
  2. The earlier scaling law this paper revises: Kaplan, McCandlish, et al., Scaling Laws for Neural Language Models (OpenAI, 2020); see also the Scaling Laws explainer.
  3. Gopher, the 280B baseline: Rae et al., Scaling Language Models: Methods, Analysis & Insights from Training Gopher (2021).
  4. The replication that re-fit Approach 3: Besiroglu, Erdil, Barnett, You, Chinchilla Scaling: A Replication Attempt (Epoch AI, 2024). The re-fit constants used in the figures come from this work, as does the account of the rounding and the early-stopped optimizer.
  5. Training past the compute-optimal point to save inference: Sardana et al., Beyond Chinchilla-Optimal: Accounting for Inference in Language Model Scaling Laws (2024).
  6. MMLU: Hendrycks et al., Measuring Massive Multitask Language Understanding (2020).