Chinchilla Scaling Laws › Worked Example: Computing Chinchilla-Optimal Allocations

Michael BrenndoerferOctober 22, 20254 min read
Language AI HandbookAll chapters
Part 23 of 67Scaling Laws
Chapter 164Chinchilla Scaling Laws › Worked Example: Computing Chinchilla-Optimal Allocations
Reading section 6 of 12 · Worked Example: Computing Chinchilla-Optimal Allocations · 4 minSection 6 of 12 · 4 min

Book contents

Section 6 of 12 · 4 min read

Chinchilla Scaling Laws › Worked Example: Computing Chinchilla-Optimal AllocationsOne section · Sections in this chapter6 / 12 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

This section shows how to compute Chinchilla-optimal model sizes and dataset sizes for a given compute budget. This shows how the scaling equations translate into concrete numbers. Seeing the algebra work through a specific example is important because the abstract power-law relationships can feel distant from the practical decisions that model developers make. When you compute that a 102210^{22} FLOP budget corresponds to a specific parameter count and token count, the equations stop being theoretical constructs and become engineering guidelines you can apply to your own training plans.

We will work through the calculation step by step, explaining the role of each factor and why the algebra takes the form it does. The derivation is short but worth following carefully, because understanding where the square root comes from and why the factor of 120 appears will help you apply the formula correctly in other contexts and catch errors when something does not look right.

Suppose we have a compute budget of 102210^{22} FLOPs. Using the approximation that training FLOPs equals 6ND6ND (where NN is parameters and DD is training tokens), and applying the Chinchilla ratio D/N≈20D/N \approx 20:

C=6ND=6N(20N)=120N2C = 6ND = 6N(20N) = 120N^2

where:

  • CC: the total compute budget in FLOPs
  • NN: the number of model parameters (what we want to solve for)
  • D=20ND = 20N: substituting the Chinchilla-optimal token count
  • The factor 120=6×20120 = 6 \times 20 combines the compute constant with the optimal ratio

This substitution works because if D=20ND = 20N (the Chinchilla-optimal ratio), then the compute formula simplifies to a function of NN alone. This constrains us to move along the Chinchilla-optimal line in the parameter-token space and determines where along that line our compute budget places us. The quadratic relationship (C∝N2C \propto N^2) emerges because both NN and DD grow together. Increasing NN automatically increases DD by the same factor, so compute grows as the square.

Solving for NN:

N=C120=1022120≈9.1×109N = \sqrt{\frac{C}{120}} = \sqrt{\frac{10^{22}}{120}} \approx 9.1 \times 10^9

where:

  • NN: the optimal number of model parameters we're solving for
  • C=1022C = 10^{22}: our target compute budget in FLOPs
  • The factor 120 comes from 6×20=1206 \times 20 = 120 (the compute constant 6 multiplied by the Chinchilla-optimal token ratio 20)
  • The result N≈9.1×109N \approx 9.1 \times 10^9 means approximately 9 billion parameters

The square root appears because we're inverting the quadratic relationship: if C=120N2C = 120N^2, then N=C/120N = \sqrt{C/120}. This means that to double our optimal model size, we need to quadruple our compute budget. Similarly, a 10x increase in compute allows only about a 3.2x increase in model size (since 10≈3.16\sqrt{10} \approx 3.16).

So approximately 9 billion parameters. The optimal token count is:

D=20N=20×9.1×109≈1.82×1011 tokens≈182 billion tokensD = 20N = 20 \times 9.1 \times 10^9 \approx 1.82 \times 10^{11} \text{ tokens} \approx 182 \text{ billion tokens}

where:

  • DD: the optimal number of training tokens
  • N=9.1×109N = 9.1 \times 10^9: the optimal parameter count computed above
  • The factor 20 is the Chinchilla-optimal tokens-per-parameter ratio

Let's verify the compute calculation:

C=6ND=6×(9.1×109)×(1.82×1011)≈1022 FLOPsC = 6ND = 6 \times (9.1 \times 10^9) \times (1.82 \times 10^{11}) \approx 10^{22} \text{ FLOPs}

This verification step confirms our arithmetic and shows that the Chinchilla-optimal allocation exactly consumes the available compute budget. Nothing is wasted. Every FLOP goes toward training a model that is neither too large (which would mean insufficient training) nor too small (which would mean wasted training iterations).

For comparison, the Kaplan scaling laws would suggest allocating more to model size. Using Kaplan's Nopt∝C0.73N_{opt} \propto C^{0.73} and Dopt∝C0.27D_{opt} \propto C^{0.27} (with appropriate constants), the same compute budget would suggest roughly 30-50 billion parameters trained on only 30-50 billion tokens. The Chinchilla allocation produces better loss for the same compute because the Kaplan allocation produces a severely undertrained model. With only about 1 token per parameter, the model has insufficient opportunity to learn from data, and many of its parameters remain poorly optimized.