The Economics of Model Training
Lesson 1 of 4Intermediate 10 min

How much compute a training run takes

Two numbers, model size and token count, give you a first estimate of any run. Here's the arithmetic, and where it falls short.

In this lesson you'll

  • Estimate training FLOPs with the 6ND rule
  • Explain what compute-optimal training means and why teams go past it
  • Convert FLOPs into GPU-hours using realistic utilisation

A Transformer costs about 6 floating-point operations per parameter per training token [1]. That gives the most useful rule of thumb in training economics, where N is parameters and D is training tokens: compute ≈ 6 × N × D. Double the model or double the data, and you double the bill. Double both, and it quadruples.

How many tokens should a model see?

DeepMind's Chinchilla work found that for a fixed compute budget, model size and training tokens should grow together: each doubling of model size should come with a doubling of tokens [2]. Their 70B-parameter Chinchilla trained on 1.4 trillion tokens, which is where the popular shorthand of about 20 tokens per parameter comes from.

That ratio minimises training cost for a given quality, not lifetime cost. A smaller model is cheaper on every request it ever serves, so teams expecting heavy usage should train smaller models for longer than Chinchilla suggests [3]. Llama 3.1 8B saw about 15 trillion tokens, close to 1,900 tokens per parameter [4].

From FLOPs to GPU-hours

No GPU sustains its advertised peak. Model FLOPs utilisation (MFU) is the share of peak a run actually achieves, and Meta reported 38–43% for Llama 3 405B on up to 16,000 H100s [5]. An H100's dense BF16 peak is about 989 TFLOPS, half the 1,979 NVIDIA lists with sparsity [6], so 40% MFU gives roughly 396 TFLOPS of useful work.

Example: a 7B model on 140B tokens (20 tokens per parameter)

compute    = 6 × 7e9 × 140e9       = 5.9e21 FLOPs
throughput = 989 TFLOPS × 40% MFU  = 396 TFLOPS per H100
time       = 5.9e21 / 396e12       = 1.5e7 GPU-seconds
           = about 4,100 H100-hours
cost       = 4,100 × $4 per hour   = about $16,500

Treat the result as a floor

The formula counts only ideal training steps. Comparing it with the GPU-hours Meta published for Llama 3.1 [4] shows the gap, assuming 15 trillion tokens and 40% MFU:

ModelFormula estimatePublished H100-hoursPublished ÷ formula
Llama 3.1 8B0.51M1.46M2.9×
Llama 3.1 70B4.4M7.0M1.6×
Llama 3.1 405B25.6M30.84M1.2×

Budget for the gap

The model card doesn't explain the difference, so don't read a cause into it. The practical lesson is simple: multiply a formula estimate by 1.5–3× before you treat it as a budget, and more for a first run.

Key takeaways

  • Training compute is about 6 × parameters × tokens.
  • About 20 tokens per parameter is compute-optimal for training, but heavily used models often train far longer.
  • Real runs reach around 40% of peak at best, and published GPU-hours can run 1.2–2.9× above the formula.

Practise in the dojo

Run a prompt-tuning job on any project, then use the 6ND rule to estimate what pretraining a 7B model would have cost. Compare the two before you decide what your task needs.

Open the Forge

Check your understanding

Score 70 or more to complete the lesson. Progress is saved in this browser.

1. You double both a model's parameters and its training tokens. What happens to training compute?
2. Why would a team train a model well past 20 tokens per parameter?
3. What does 40% MFU mean?

Further reading

Sources

Checked against the original sources in November 2026.

  1. [1]Kaplan, J. et al. (2020). Scaling Laws for Neural Language Models. arXiv:2001.08361.
  2. [2]Hoffmann, J. et al. (2022). Training Compute-Optimal Large Language Models. NeurIPS 2022 · arXiv:2203.15556.
  3. [3]Sardana, N. et al. (2023). Beyond Chinchilla-Optimal: Accounting for Inference in Language Model Scaling Laws. ICML 2024 · arXiv:2401.00448.
  4. [4]Meta (2024). Llama 3.1 model card. GitHub · meta-llama/llama-models.
  5. [5]Llama Team, AI @ Meta (2024). The Llama 3 Herd of Models. arXiv:2407.21783.
  6. [6]NVIDIA (2026). NVIDIA H100 Tensor Core GPU. nvidia.com.