Contents

Foundation Model Engineering

Manuscript updated (UTC) · Chapter source on GitHub · Cite this chapter (RIS)

On this page

8.2 Chinchilla Optimality

With a fixed training budget, should you train a larger model briefly or a smaller model on more tokens? Chinchilla makes that allocation question explicit. Hoffmann et al. train more than 400 models and find that model size and token count should grow approximately together within their studied setup [1]. This is an empirical scaling result, not a physical law or a universal tokens-per-parameter requirement.

1. The Objective Determines the Optimum

Let NN denote parameters, DD training tokens, and CC approximate dense-training FLOPs. A commonly used approximation is C≈6NDC\approx6ND; it omits important sequence-length, architecture and system overheads. A fitted loss model can take the form:

L(N,D)=E+ANα+BDβ.L(N,D)=E+\frac{A}{N^\alpha}+\frac{B}{D^\beta}.

EE is a fitted irreducible term; A,B>0A,B>0 set scale, and α,β>0\alpha,\beta>0 describe the measured decay rates. These constants depend on corpus, tokenizer, model family, optimization, and fitting regime. Substituting D=C/(6N)D=C/(6N) and minimizing the fitted loss gives:

N∗∝Cβ/(α+β),D∗∝Cα/(α+β).N^*\propto C^{\beta/(\alpha+\beta)},\qquad D^*\propto C^{\alpha/(\alpha+\beta)}.

When the exponents are similar, both allocations scale roughly with the square root of compute. Their ratio also depends on the fitted coefficients. Equal scaling exponents do not establish one universal ratio across every family.

The paper’s Chinchilla example uses 70B parameters and approximately 1.4T tokens and compares favorably with the larger Gopher at a similar training budget [1]. A useful historical rule of thumb is about 20 tokens per parameter in that regime. Applying it to 100B tokens yields 5B parameters as an illustrative allocation, not a guarantee of the best model for a new corpus or product.

2. A Calculator with Explicit Assumptions

The interaction fixes D=20ND=20N solely to show the relationship between compute, model size and tokens. With NB,DBN_B,D_B in billions and CZC_Z in 102110^{21} FLOPs:

CZ≈0.006NBDB=0.12NB2.C_Z\approx0.006N_BD_B=0.12N_B^2.

The factor conversion matters: FLOPs count operations; FLOP/s is a throughput. Hardware time additionally depends on achieved utilization, communication and overhead. MoE active compute, full stored parameters, attention work and state memory require separate accounting.

Allocate compute at a fixed token ratio

Educational calculation assuming C ≈ 6ND and D = 20N. The 20:1 token ratio is not a universal optimum across models, data or deployment objectives.

Parameters N

0.913 B

Training tokens D

18.257 B

B denotes 10⁹. In these units C = 0.12N². Display values are rounded; internal calculations are not. FLOPs measure operation count, not FLOP/s throughput or elapsed time.

This is a dense-training compute approximation; sequence-length attention, active MoE experts, communication, evaluation and checkpoints are omitted. Choose real allocations using held-out loss curves and total training/serving cost.

3. How to Validate an Allocation

Treat the following as an experiment contract, not an executable training recipe.

ContractEvidence to record
InputsImmutable dataset manifest with provenance, licenses/consent, PII/deletion lineage, filter versions, mixture weights, shard/sample IDs; tokenizer and code/config hashes
ObjectiveToken-normalized next-token cross-entropy and declared domain slices; specify loss masks, BOS/EOS, truncation, padding, packing boundaries and variable-length reduction
Decisive hyperparametersModel widths/depths, total tokens, sequence length, token batch, optimizer/LR, warmup/decay schedule, seed and precision; tune schedules to each trial budget
Compute/memoryParameters, gradients, optimizer state, activations, temporary buffers, collectives, checkpoints and evaluation separately; state sharding and recomputation
Observable metricsTrain/validation loss per token and domain, nonfinite/overflow counts, gradient/activation norms, throughput, MFU, data wait and collective/straggler time with reconstructable batch IDs
Abort/recoveryPredeclared numerical and quality thresholds; atomically published sharded model/optimizer, scheduler/scaler, RNG, sampler and exact data cursor plus hashes; checksums, retention, replication and restore drill
Evaluation/releaseUntouched domain, base-capability retention, safety, format/tool, latency, cost and error gates with paired uncertainty; owner, observation window and rollback rehearsal

Group related documents and synthetic siblings before train/dev/test assignment; quarantine public/private benchmarks, rubrics, semantic neighbors and teacher variants from every training mixture. Fit scaling coefficients on comparable trials and evaluate residuals and extrapolation uncertainty. A trial with an unsuitable schedule or leaked validation set can make the fitted optimum misleading.

No wall-time, GPU-count or training-quality promise follows from the calculator. Convert FLOPs into a measured capacity plan, reserve evaluation/recovery budget, and verify checkpoint continuation equivalence before a large run. The distributed training chapters supply the execution contracts.

4. Training-optimal and Deployment-optimal Differ

Minimizing pretraining loss at fixed training FLOPs is different from minimizing lifetime cost at a required quality level. A smaller model trained on more tokens can be attractive for repeated inference, but only when measured quality, traffic and serving savings justify the additional training. Data reuse, scarce high-quality data, inference latency, licensing and retention constraints can change that choice.

Evaluate several checkpoint/token allocations with the same downstream probe and release criteria. Include training, adaptation, evaluation, storage and total serving cost per successful task. Section 8.3 extends this reasoning to over-training; the model’s parameter count or a fixed token ratio cannot settle the economic decision by itself.

Quizzes

Quiz 1: Does equal scaling of parameters and tokens establish a universal 20:1 ratio? No. The ratio depends on fitted coefficients, data, architecture and the objective; approximately equal exponents only describe how allocations grow with compute.

Quiz 2: What does the calculator recommend for 100B tokens? Under its fixed D=20N assumption it corresponds to 5B parameters. That is a conditional illustration, not a private-task quality guarantee.

Quiz 3: Why is training-optimal not necessarily deployment-optimal? Lifetime cost includes repeated inference, adaptation and operations. More training on a smaller model can pay off only under measured quality and traffic assumptions.

Quiz 4: Why must trial schedules and evaluation isolation be controlled? Under-optimized trials or leaked validation data distort fitted losses and inferred allocations. Pin schedules to trial budgets and keep evaluation families quarantined.

References

  1. Hoffmann, J., et al. (2022). Training Compute-Optimal Large Language Models. Paper.