Chinchilla prescription: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
[[Category:Large language model]] | [[Category:Large language model]] | ||
The '''Chinchilla prescription''', derived by [[Source:Training Compute-Optimal Large Language Models (Conference paper)|name-author]],prescribes the compute-optimal division of a fixed training budget between model parameters and training tokens for a [[Transformer]].<ref>{{#cite:Q3164}}</ref> | |||
The '''Chinchilla prescription''' | |||
== 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 \label{compute budget} | |||
$$ | $$ | ||
<div class="center"> | |||
{| class="wikitable" | |||
|- | |||
| $C$ | |||
$$ | | Training compute in floating-point operations | ||
|- | |||
| $ |\theta|$ | |||
| Parameter count | |||
|- | |||
| $D$ | |||
| Number of training tokens | |||
$ | |- | ||
| $ |\theta|D$ | |||
| Forward-pass compute cost | |||
|- | |||
| $ |\theta|D$ | |||
| Backward-pass compute cost | |||
$$ | |} | ||
</div> | |||
- | |||
== Compute-optimal allocation == | == Compute-optimal allocation == | ||
[[Source:Training Compute-Optimal Large Language Models (Conference paper)|name-author]] proposes modelling [[language model loss|loss]] as a function of $\theta,D$, with an irreducible floor $L_\infty$ and parameters $|\theta|_c$, $D_c$, $\alpha_\theta$, $\alpha_D$ to be determined empirically: | |||
$$ | $$ | ||
| Line 152: | Line 44: | ||
$$ | $$ | ||
Subject to $C = 6|\theta|D$, at optimum $L_\text{min}$ | |||
$$ | $$ | ||
| Line 161: | Line 53: | ||
$$ | $$ | ||
Empirically, it was determined at the '''efficient frontier''', | |||
$$ | $$ | ||
\frac{\alpha_\theta}{\alpha_\theta+\alpha_D}=0.46,\, \frac{\alpha_\theta}{\alpha_\theta+\alpha_D}=0.54 | |||
$$ | $$ | ||
that | which suggests that '''parameter count and training data size should scale nearly proportionally'''. | ||
It is further determined experimentally | |||
$$ | |||
D_\text{opt} \approx 20\,|\theta|_\text{opt}, | |||
$$ | |||
== History == | |||
[[Source:Scaling Laws for Neural Language Models (Manuscript)|name-author]] had recommended spending most of an increased compute budget on parameters: | |||
* $|\theta|_{\text{opt}} \propto C^{0.73}$ | |||
* $D_{\text{opt}} \propto C^{0.27}$ | |||
The models built to that advice were correspondingly large and undertrained.<ref>{{#cite:Q3141}}</ref> | |||
== | == Experimental evidence == | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ Allocation for 3 early large language models | |+ Allocation for 3 early large language models | ||
! Model | ! Model | ||
! $|\theta|$ | ! $ |\theta|$ | ||
! $D$ | ! $D$ | ||
! $D | ! $\frac{D}{\|\theta\|}$ | ||
|- | |- | ||
| Gopher | | Gopher | ||
| Line 198: | Line 101: | ||
|} | |} | ||
Chinchilla was trained on the same compute budget as Gopher, with 4 times fewer parameters and about 5 times more data, and outperformed Gopher | Chinchilla was trained on the same compute budget as Gopher, with 4 times fewer parameters and about 5 times more data, and outperformed Gopher and GPT-3, both models several times its size.<ref>{{#cite:Q3164}}</ref> | ||
== Data-constrained regime and the data wall == | == Data-constrained regime and the data wall == | ||
Revision as of 20:05, 11 November 2026
The Chinchilla prescription, derived by Hoffmann et al. (2022),prescribes the compute-optimal division of a fixed training budget between model parameters and training tokens for a Transformer.[1]
Compute budget
Training compute is dominated by the matrix multiplications of the forward and backward passes and is approximated by
$$\begin{gather} C \approx 6\,|\theta|\,D \label{compute budget} \end{gather}$$
| $C$ | Training compute in floating-point operations |
| $ |\theta|$ | Parameter count |
| $D$ | Number of training tokens |
| $ |\theta|D$ | Forward-pass compute cost |
| $ |\theta|D$ | Backward-pass compute cost |
Compute-optimal allocation
Hoffmann et al. (2022) proposes modelling loss as a function of $\theta,D$, with an irreducible floor $L_\infty$ and parameters $|\theta|_c$, $D_c$, $\alpha_\theta$, $\alpha_D$ to be determined empirically:
$$ L(|\theta|,D) = L_\infty + \left(\frac{|\theta|_c}{|\theta|}\right)^{\alpha_\theta} + \left(\frac{D_c}{D}\right)^{\alpha_D}, $$
Subject to $C = 6|\theta|D$, at optimum $L_\text{min}$
$$ \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} $$
Empirically, it was determined at the efficient frontier,
$$ \frac{\alpha_\theta}{\alpha_\theta+\alpha_D}=0.46,\, \frac{\alpha_\theta}{\alpha_\theta+\alpha_D}=0.54 $$
which suggests that parameter count and training data size should scale nearly proportionally.
It is further determined experimentally
$$ D_\text{opt} \approx 20\,|\theta|_\text{opt}, $$
History
Kaplan et al. (2020) had recommended spending most of an increased compute budget on parameters:
- $|\theta|_{\text{opt}} \propto C^{0.73}$
- $D_{\text{opt}} \propto C^{0.27}$
The models built to that advice were correspondingly large and undertrained.[2]
Experimental evidence
| Model | $ |\theta|$ | $D$ | $\frac{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 and GPT-3, both models several times its size.[1]
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]
- ↑ ↑ Hoffmann, J., Borgeaud, S., Mensch, A., Buchatskaya, E., Cai, T., Rutherford, E., de Las Casas, D., Hendricks, L. A., Welbl, J., Clark, A., Hennigan, T., Noland, E., Millican, K., van den Driessche, G., Damoc, B., Guy, A., Osindero, S., Simonyan, K., Elsen, E., … Sifre, L. (2022). Training Compute-Optimal Large Language Models. https://doi.org/10.48550/arXiv.2203.15556
- ↑ Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., & Amodei, D. (2020). Scaling Laws for Neural Language Models. https://arxiv.org/abs/2001.08361
- ↑ Muennighoff, N., Rush, A. M., Barak, B., Le Scao, T., Piktus, A., Tazi, N., Pyysalo, S., Wolf, T., & Raffel, C. (2023). Scaling Data-Constrained Language Models. https://doi.org/10.48550/arXiv.2305.16264
- ↑ Villalobos, P., Ho, A., Sevilla, J., Besiroglu, T., Heim, L., & Hobbhahn, M. (2024). Will we run out of data? Limits of LLM scaling based on human-generated data. https://doi.org/10.48550/arXiv.2211.04325