Training compute is approximately C≈6ND FLOPs for N parameters and D tokens. The Chinchilla result suggests a compute-optimal ratio of about D≈20N. (a) For C=1023 FLOPs, what N and D are compute-optimal? (b) How many tokens and how much compute does a compute-optimal 7B model need? (c) How much compute does a 70B model trained on 1.4T tokens use?

Sequence models and transformers, Scaling laws
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can combine the 6ND cost rule with the D=20N ratio and do the arithmetic.

Key idea

Substitute D=20N into C=6ND: C=120N2, so N⋆=C/120 and D⋆=20N⋆.

Steps

  1. Forward and backward passes cost about 2N and 4N FLOPs per token, so 6ND in total.
  2. (a) C=120N2⇒N=1023/120=8.33×1020=2.89×1010, about 29 billion parameters.
  3. Then D=20N=5.77×1011, about 577 billion tokens. Check: 6×2.89×1010×5.77×1011=1023.
  4. (b) N=7×109 gives D=20N=1.4×1011=140 billion tokens. C=6×7×109×1.4×1011=5.88×1021 FLOPs.
  5. (c) C=6×7×1010×1.4×1012=5.88×1023 FLOPs. This is the Chinchilla budget itself, where D/N=20.
  6. Comment: models trained on far more than 20N tokens (for example a small model on trillions) are not compute-optimal, but they are cheaper to serve per query, which can justify the extra training.

Common mistakes

How long your answer should be

Short derivation and three numbers; 4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Sequence models and transformers: In BERT's masked language modelling, 15% of tokens are chosen for prediction. Of those, 80% become [MASK], 10% become a random token and 10% stay unchanged. What fraction of all tokens are in each case? Why not simply use [MASK] every time?
Next in Sequence models and transformers: Two finished hypotheses have token probabilities H1=(0.4, 0.5) and H2=(0.6, 0.6, 0.6, 0.6). Which one does beam search prefer by raw log-probability? Which by average log-probability, and which by GNMT length normalisation log⁡P/((5+∣Y∣)/6)? What bias does this show?