You are reading immutable version 1. The current guide may be newer.

Study the paper

Scaling Laws for Neural Language Models

Lessons, visuals, quizzes, flashcards, and resources—organized in teaching order.

All activities

The Infinite Data Limit and Overfitting

Power-law scaling with dataset size

Power-law scaling with dataset size

Source equation

L(D)=(Dc/D)αD;  αD0.095,Dc5.4×1013 (tokens)L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\nobreak\ \nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\nobreak\ \text{(tokens)}

This equation models the power-law scaling of language model performance (measured by cross-entropy loss) as a function of the dataset size DD (in tokens), assuming that the model capacity and training compute are not bottlenecking performance.

Sources

S1.E2

L​(D)=(Dc/D)αD;αD∼0.095,Dc∼5.4×1013​(tokens)formulae-sequence𝐿𝐷superscriptsubscript𝐷c𝐷subscript𝛼𝐷formulae-sequencesimilar-tosubscript𝛼𝐷0.095similar-tosubscript𝐷c5.4superscript1013(tokens)L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\leavevmode\nobreak\ \leavevmode\nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\leavevmode\nobreak\ \text{(tokens)} (1.2)
L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\leavevmode\nobreak\ \leavevmode\nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\leavevmode\nobreak\ \text{(tokens)}

L(D)=(Dc/D)αD;  αD0.095,Dc5.4×1013 (tokens)L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\nobreak\ \nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\nobreak\ \text{(tokens)}

Sources

S1.E2

L​(D)=(Dc/D)αD;αD∼0.095,Dc∼5.4×1013​(tokens)formulae-sequence𝐿𝐷superscriptsubscript𝐷c𝐷subscript𝛼𝐷formulae-sequencesimilar-tosubscript𝛼𝐷0.095similar-tosubscript𝐷c5.4superscript1013(tokens)L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\leavevmode\nobreak\ \leavevmode\nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\leavevmode\nobreak\ \text{(tokens)} (1.2)
L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\leavevmode\nobreak\ \leavevmode\nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\leavevmode\nobreak\ \text{(tokens)}

Illustrative Calculation

Let us calculate the predicted cross-entropy loss L(D)L(D) for a dataset size of D=109D = 10^9 tokens.

Using the empirical constants:

  • Dc=5.4×1013D_{\mathrm{c}} = 5.4 \times 10^{13}
  • αD=0.095\alpha_{D} = 0.095

We compute:

  1. The ratio: DcD=5.4×1013109=54,000\frac{D_{\mathrm{c}}}{D} = \frac{5.4 \times 10^{13}}{10^9} = 54,000
  2. The power-law scaling: L(D)=(54,000)0.0952.808L(D) = (54,000)^{0.095} \approx 2.808
Sources

S1.E2

L​(D)=(Dc/D)αD;αD∼0.095,Dc∼5.4×1013​(tokens)formulae-sequence𝐿𝐷superscriptsubscript𝐷c𝐷subscript𝛼𝐷formulae-sequencesimilar-tosubscript𝛼𝐷0.095similar-tosubscript𝐷c5.4superscript1013(tokens)L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\leavevmode\nobreak\ \leavevmode\nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\leavevmode\nobreak\ \text{(tokens)} (1.2)
L(D)=\left(D_{\mathrm{c}}/D\right)^{\alpha_{D}};\leavevmode\nobreak\ \leavevmode\nobreak\ \alpha_{D}\sim 0.095,\quad D_{\mathrm{c}}\sim 5.4\times 10^{13}\leavevmode\nobreak\ \text{(tokens)}
L(D)L(D)
Cross-entropy loss as a function of dataset size · scalar
DD
Dataset size in tokens · scalar
DcD_{\mathrm{c}}
Critical dataset size constant · scalar
αD\alpha_{D}
Power-law scaling exponent for dataset size · scalar