Jump to content

Chinchilla prescription: Difference between revisions

From Wikibase
Notation: loss is L, compute is C (via update-page on MediaWiki MCP Server)
Parameter count is |theta|, including the fitted constant (N_c becomes |theta|_c) and exponent alpha_theta (via update-page on MediaWiki MCP Server)
Line 8: Line 8:


$$
$$
C \approx 6ND,
C \approx 6\,|\theta|\,D,
$$
$$


where $N$ is the parameter count, $D$ the number of training tokens, and $C$ is the training compute in floating-point operations: the forward pass costs about $2ND$ and the backward pass about $4ND$.
where $|\theta|$ is the parameter count, $D$ the number of training tokens, and $C$ is the training compute in floating-point operations: the forward pass costs about $2|\theta|D$ and the backward pass about $4|\theta|D$.


== Compute-optimal allocation ==
== Compute-optimal allocation ==


The prescription follows from writing the [[language model loss|loss]] as a function of both quantities, with an irreducible floor $L_\infty$ and fitted constants $N_c$, $D_c$, $\alpha_N$, $\alpha_D$,
The prescription follows from writing the [[language model loss|loss]] as a function of both quantities, with an irreducible floor $L_\infty$ and fitted constants $|\theta|_c$, $D_c$, $\alpha_\theta$, $\alpha_D$,


$$
$$
L(N,D)
L(|\theta|,D)
=
=
L_\infty
L_\infty
+
+
\left(\frac{N_c}{N}\right)^{\alpha_N}
\left(\frac{|\theta|_c}{|\theta|}\right)^{\alpha_\theta}
+
+
\left(\frac{D_c}{D}\right)^{\alpha_D},
\left(\frac{D_c}{D}\right)^{\alpha_D},
$$
$$


and minimising it subject to $C = 6ND$. At the optimum the 2 reducible terms are reduced in balance, and the 2 quantities scale as
and minimising it subject to $C = 6|\theta|D$. At the optimum the 2 reducible terms are reduced in balance, and the 2 quantities scale as


$$
$$
\begin{cases}
\begin{cases}
N_{\text{opt}} \propto C^{\alpha_D/(\alpha_N+\alpha_D)} \\
|\theta|_{\text{opt}} \propto C^{\alpha_D/(\alpha_\theta+\alpha_D)} \\
D_{\text{opt}} \propto C^{\alpha_N/(\alpha_N+\alpha_D)}
D_{\text{opt}} \propto C^{\alpha_\theta/(\alpha_\theta+\alpha_D)}
\end{cases}
\end{cases}
$$
$$


so the balance between parameters and data is set by the relative size of the 2 exponents. Because $\alpha_N$ and $\alpha_D$ are of similar magnitude, both allocation exponents come out near $1/2$, and in practice the prescription reduces to
so the balance between parameters and data is set by the relative size of the 2 exponents. Because $\alpha_\theta$ and $\alpha_D$ are of similar magnitude, both allocation exponents come out near $1/2$, and in practice the prescription reduces to


$$
$$
D \approx 20N,
D \approx 20\,|\theta|,
$$
$$


Line 46: Line 46:
== Contrast with earlier scaling laws ==
== Contrast with earlier scaling laws ==


Kaplan et al. had recommended spending most of an increased budget on parameters, with $N_{\text{opt}} \propto C^{0.73}$ and $D_{\text{opt}} \propto C^{0.27}$, and the models built to that advice were correspondingly large and undertrained.<ref>{{#cite:Q3141}}</ref> The Chinchilla result instead grows the 2 in step, which at a fixed compute budget means markedly more data and fewer parameters than the earlier advice implied.
Kaplan et al. had recommended spending most of an increased budget on parameters, with $|\theta|_{\text{opt}} \propto C^{0.73}$ and $D_{\text{opt}} \propto C^{0.27}$, and the models built to that advice were correspondingly large and undertrained.<ref>{{#cite:Q3141}}</ref> The Chinchilla result instead grows the 2 in step, which at a fixed compute budget means markedly more data and fewer parameters than the earlier advice implied.


== Worked examples ==
== Worked examples ==
Line 53: Line 53:
|+ Allocation for 3 early large language models
|+ Allocation for 3 early large language models
! Model
! Model
! $N$
! $|\theta|$
! $D$
! $D$
! $D/N$
! $D/|\theta|$
|-
|-
| Gopher
| Gopher
Line 76: Line 76:


$$
$$
N_{\text{opt}} = \sqrt{\frac{C}{120}} \approx 5\times10^{10},
|\theta|_{\text{opt}} = \sqrt{\frac{C}{120}} \approx 5\times10^{10},
\qquad
\qquad
D_{\text{opt}} \approx 1\times10^{12},
D_{\text{opt}} \approx 1\times10^{12},
Line 88: Line 88:


$$
$$
L_{\text{data}}(N, D_{\max})
L_{\text{data}}(|\theta|, D_{\max})
=
=
L_\infty
L_\infty
+
+
\left(\frac{N_c}{N}\right)^{\alpha_N}
\left(\frac{|\theta|_c}{|\theta|}\right)^{\alpha_\theta}
+
+
\left(\frac{D_c}{D_{\max}}\right)^{\alpha_D},
\left(\frac{D_c}{D_{\max}}\right)^{\alpha_D},
$$
$$


in which further gains must come from $N$, from [[algorithmic efficiency]], or from [[synthetic data]], rather than from additional human-written text. This regime is the [[data wall]].
in which further gains must come from $|\theta|$, from [[algorithmic efficiency]], or from [[synthetic data]], rather than from additional human-written text. This regime is the [[data wall]].


Repeating the tokens already in hand is a partial substitute: up to roughly 4 epochs of repetition costs almost nothing in loss, but beyond that the marginal value of additional compute decays towards zero.<ref>{{#cite:Q3174}}</ref> Estimates of the stock of public human text place its exhaustion, if current trends continue, between 2026 and 2032.<ref>{{#cite:Q3181}}</ref>
Repeating the tokens already in hand is a partial substitute: up to roughly 4 epochs of repetition costs almost nothing in loss, but beyond that the marginal value of additional compute decays towards zero.<ref>{{#cite:Q3174}}</ref> Estimates of the stock of public human text place its exhaustion, if current trends continue, between 2026 and 2032.<ref>{{#cite:Q3181}}</ref>

Revision as of 16:22, 11 November 2026

Languages: English · français · Esperanto

The Chinchilla prescription is the compute-optimal division of a fixed training budget between model parameters and training tokens for a Transformer language model, derived by Hoffmann et al. in 2022.[1] Its headline result is that the 2 quantities should grow together: every doubling of parameter count should be matched by a doubling of training tokens.

Compute budget

Training compute is dominated by the matrix multiplications of the forward and backward passes and is approximated by

$$ C \approx 6\,|\theta|\,D, $$

where $|\theta|$ is the parameter count, $D$ the number of training tokens, and $C$ is the training compute in floating-point operations: the forward pass costs about $2|\theta|D$ and the backward pass about $4|\theta|D$.

Compute-optimal allocation

The prescription follows from writing the loss as a function of both quantities, with an irreducible floor $L_\infty$ and fitted constants $|\theta|_c$, $D_c$, $\alpha_\theta$, $\alpha_D$,

$$ L(|\theta|,D) = L_\infty + \left(\frac{|\theta|_c}{|\theta|}\right)^{\alpha_\theta} + \left(\frac{D_c}{D}\right)^{\alpha_D}, $$

and minimising it subject to $C = 6|\theta|D$. At the optimum the 2 reducible terms are reduced in balance, and the 2 quantities scale as

$$ \begin{cases} |\theta|_{\text{opt}} \propto C^{\alpha_D/(\alpha_\theta+\alpha_D)} \\ D_{\text{opt}} \propto C^{\alpha_\theta/(\alpha_\theta+\alpha_D)} \end{cases} $$

so the balance between parameters and data is set by the relative size of the 2 exponents. Because $\alpha_\theta$ and $\alpha_D$ are of similar magnitude, both allocation exponents come out near $1/2$, and in practice the prescription reduces to

$$ D \approx 20\,|\theta|, $$

that is, about 20 training tokens per parameter.

Contrast with earlier scaling laws

Kaplan et al. had recommended spending most of an increased budget on parameters, with $|\theta|_{\text{opt}} \propto C^{0.73}$ and $D_{\text{opt}} \propto C^{0.27}$, and the models built to that advice were correspondingly large and undertrained.[2] The Chinchilla result instead grows the 2 in step, which at a fixed compute budget means markedly more data and fewer parameters than the earlier advice implied.

Worked examples

Allocation for 3 early large language models
Model $|\theta|$ $D$ $D/|\theta|$
Gopher $2.8\times10^{11}$ $3\times10^{11}$ $1.07$
GPT-3 $1.75\times10^{11}$ $3\times10^{11}$ $1.71$
Chinchilla $7\times10^{10}$ $1.4\times10^{12}$ $20$

Chinchilla was trained on the same compute budget as Gopher, with 4 times fewer parameters and about 5 times more data, and outperformed Gopher, GPT-3, and models several times its size.[1] Applied to GPT-3's training budget of about $3.15\times10^{23}$ FLOPs, the prescription gives

$$ |\theta|_{\text{opt}} = \sqrt{\frac{C}{120}} \approx 5\times10^{10}, \qquad D_{\text{opt}} \approx 1\times10^{12}, $$

against GPT-3's actual $1.75\times10^{11}$ parameters and $3\times10^{11}$ tokens.

Data-constrained regime and the data wall

If the available token stock $D_{\max}$ falls short of $D_{\text{opt}}$, the prescription cannot be followed. With $D$ capped, the loss is better described by

$$ L_{\text{data}}(|\theta|, D_{\max}) = L_\infty + \left(\frac{|\theta|_c}{|\theta|}\right)^{\alpha_\theta} + \left(\frac{D_c}{D_{\max}}\right)^{\alpha_D}, $$

in which further gains must come from $|\theta|$, from algorithmic efficiency, or from synthetic data, rather than from additional human-written text. This regime is the data wall.

Repeating the tokens already in hand is a partial substitute: up to roughly 4 epochs of repetition costs almost nothing in loss, but beyond that the marginal value of additional compute decays towards zero.[3] Estimates of the stock of public human text place its exhaustion, if current trends continue, between 2026 and 2032.[4]