Chinchilla Scaling Laws › Worked Example: Computing Chinchilla-Optimal Allocations
Language AI HandbookAll chapters 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 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 FLOPs. Using the approximation that training FLOPs equals (where is parameters and is training tokens), and applying the Chinchilla ratio :
where:
- : the total compute budget in FLOPs
- : the number of model parameters (what we want to solve for)
- : substituting the Chinchilla-optimal token count
- The factor combines the compute constant with the optimal ratio
This substitution works because if (the Chinchilla-optimal ratio), then the compute formula simplifies to a function of 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 () emerges because both and grow together. Increasing automatically increases by the same factor, so compute grows as the square.
Solving for :
where:
- : the optimal number of model parameters we're solving for
- : our target compute budget in FLOPs
- The factor 120 comes from (the compute constant 6 multiplied by the Chinchilla-optimal token ratio 20)
- The result means approximately 9 billion parameters
The square root appears because we're inverting the quadratic relationship: if , then . 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 ).
So approximately 9 billion parameters. The optimal token count is:
where:
- : the optimal number of training tokens
- : the optimal parameter count computed above
- The factor 20 is the Chinchilla-optimal tokens-per-parameter ratio
Let's verify the compute calculation:
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 and (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.