Training compute budget
A training run spends a fixed number of floating-point operations. A common estimate is C ≈ 6ND, where N is the number of parameters and D the number of training tokens. For a given C you can trade size for data: a bigger model on fewer tokens, or a smaller one on more.
For 5.76 × 10²³ FLOPs, this fit puts the lowest loss at 40.3B parameters trained on 2.38T tokens.
This law was fitted on 70M to 16B parameters and 5B to 500B tokens. These numbers extrapolate beyond it, so treat them as a trend, not a measurement.
Inputs
Type a value such as 5.76e23.
Besiroglu et al. 2024, Chinchilla Scaling: A replication attempt. Fitted on 70M to 16B parameters and 5B to 500B tokens.
| Split | Parameters | Tokens | Tokens per parameter | Predicted loss |
|---|---|---|---|---|
| Compute-optimal (this fit) | 40.3B | 2.38T | 59.1 | 1.918 |
| 20 tokens per parameter | 69.3B | 1.39T | 20 | 1.922 |
What it shows
Training spends a fixed number of floating-point operations, C ≈ 6ND. For a given C, you trade model size N against training tokens D.
The tool applies three published scaling-law fits to find the split with the lowest predicted loss. You can also enter your own N and D to see how far your run is from that split.
How to read it
- Compute-optimal parameters and tokens are the split with the lowest fitted loss at your budget. Tokens per parameter is their ratio.
- Predicted loss splits into an irreducible part and the parts left by finite model size and finite data.
- Loss describes the paper’s dataset and tokenizer. Compare it between splits, not with your own training curves.
- The curve shows loss against model size at one budget. Its bottom is flat, so sizes near the optimum cost little loss.
- A note appears when your numbers fall outside the range the fit was measured on. They then extrapolate.
- Different fits give different answers for the same budget. Compare them before relying on one.
Questions
Where does the 20 tokens per parameter rule come from?
It is a rounded reading of the Chinchilla results, where the best models at several budgets were trained on roughly 20 tokens for every parameter. It is a rule of thumb. The fitted laws put the ratio somewhat above or below that depending on the fit and the budget.
Why do the three fits disagree?
A replication attempt re-fitted the same functional form to data read from the paper’s figures and found different constants, and rounding the printed exponents moves the frontier a long way. This tool defaults to the unrounded constants of the original fit, offers the rounded printed ones and the replication, and lets you compare.
Is C = 6ND exact?
No. It counts the matrix multiplications against the weights and leaves out attention, which grows with context length. It is a good estimate when the context is short relative to the model width and a poorer one for long contexts.
Should I train a model to the compute-optimal point?
Compute-optimal minimises loss for training cost only. A model that will serve many requests can be worth training on more tokens than optimal, because a smaller model costs less to run. The distance-from-optimal view shows what that trade costs in training loss.
Sources
Explore further
- Epoch AI: notable AI modelsTraining compute, size and cost estimates for hundreds of published models.
Last updated
More tools
All tools- estimatorTraining cost estimatorTurn parameters and tokens into FLOPs, GPU-hours, days and a cost at a price you enter.Open tool
- estimatorTraining memory plannerEstimate per-GPU memory for training: weights, gradients, optimiser states and activations, by ZeRO stage.Open tool
- calculatorLoRA parameter counterCount the trainable parameters, file size and optimiser memory of a LoRA adapter for real model shapes.Open tool