Training cost estimator
Training cost is compute divided by the useful speed of the hardware. Compute is about 6 × parameters × tokens. Useful speed is the GPU’s peak throughput multiplied by the model FLOPs utilisation (MFU), the share of that peak a real run turns into model work.
$825,416 and 16.8 days on 1,024 GPUs, at your $2.00 per GPU-hour and 40% MFU.
Inputs
1.4T tokens.
80 GB memory.
Model FLOPs utilisation is an assumption, not a spec. Pick it from the reference points in the results or type your own.
$2 is only an example, not a quote. Rates vary by provider, term and region.
| Published run | MFU | GPU-hours here | Action |
|---|---|---|---|
| PaLM 540B on TPU v4 | 46.2% | 357,323 | |
| Llama 3 405B on H100 | 38% to 43% | 407,613 | |
| Gopher 280B on TPU v3 | 32.5% | 507,948 | |
| Megatron-Turing NLG 530B on A100 | 30.2% | 546,633 | |
| GPT-3 175B on V100 | 21.3% | 775,039 |
The estimate is pure compute time at a steady MFU. It leaves out failed and restarted jobs, evaluation, data preparation, checkpointing, ablation runs and idle capacity, which often cost as much as the final run. The reference points are bf16 runs on the hardware named; your cluster and software stack may land elsewhere.
What it shows
GPU-hours are FLOPs ÷ (peak FLOP/s × MFU) ÷ 3,600. Divide by the number of GPUs for wall-clock time, then multiply the GPU-hours by a price for the cost. Peak figures come from the shared GPU spec list, dense and not sparse, in bf16 or fp8.
MFU is the number you must assume. The tool labels it as an assumption, lists values from published runs to start from and lets you change it. The price is yours too: the default is an example, not a quote.
How to read it
- “Cost at your price” is GPU-hours times the price you enter. Change the price to match an offer you have.
- GPU-hours do not depend on the number of GPUs. Wall-clock time does, and it assumes the run scales perfectly.
- “Achieved per GPU” is the peak times the MFU. In “Parameters and tokens” mode it also shows tokens per second per GPU.
- The reference table lists MFU from published runs. “Use” fills in the midpoint of a range; “GPU-hours here” shows what that MFU gives you.
- The estimate is a floor. It counts one clean run of compute and leaves out restarts, evaluation, data work and failed experiments.
Questions
What is MFU and what value should I use?
Model FLOPs utilisation is achieved model FLOP/s divided by the hardware’s peak, as defined in the PaLM paper. Published values range from about 21% to 46%, and the Llama 3 405B run reported 38% to 43% in bf16. Your value depends on parallelism, kernels and interconnect, so start from a reference point and measure.
Why do I enter the GPU price myself?
Prices vary by provider, commitment, region and time, and they change faster than any list we could keep. The $2 default is a round example. Enter the rate you have been offered.
Does the estimate include failures and experiments?
No. It is the compute of one uninterrupted run. Restarts, evaluation, data preparation, ablations and idle time add to the real bill, so treat the result as a lower bound.
Should I choose fp8 or bf16?
fp8 peak is higher on GPUs that support it, but the MFU you can reach against that higher peak is a separate assumption, and the reference points here are for 16-bit training. The tool shows no fp8 result for GPUs without a published dense fp8 figure.
Sources
Explore further
- Machine Learning EngineeringStas Bekman’s open book on the hardware and engineering behind training large models.
Last updated
More tools
All tools- estimatorTraining compute budgetSplit a training budget between model size and tokens using fitted scaling laws, or check an existing run.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