AI Infra Interviews logo

GPUs and time-to-train calculator

Estimate dense-model training FLOPs, time, GPU rental cost and a memory lower bound. Change the assumed MFU, fleet size and deadline; check the formula and its limits.

Run

Fleet

Scaling assumes the same MFU at every fleet size. Replace the starting GPU-hour rate with your quote; it is not a live price.

Training compute
6.30e+24FLOPs
6 × 70B × 15T
Training time on 4,096 GPUs
45.0 days
3.9M tokens/s at the chosen MFU
GPUs for a 30-day deadline
6,144
at 40% MFU on H100 80GB SXM
GPU rental estimate
$11.06M
4.42M GPU-hours × $2.5/h
Does the static state fit?

This assumed Adam layout uses 16 bytes per parameter: bf16 weights and gradients, fp32 master weights and two fp32 moments. For 70B that is 1.1 TB, which fully sharded (ZeRO-3 / FSDP) needs at least 18 × H100 80GB SXM with an assumed 80% memory allowance. Optimizer and gradient precision can change this layout. Activations, temporary parameter gathers and communication buffers still need to fit; this aggregate check does not establish a feasible parallelism plan.

How this was computed
FLOPs
6 × 70e9 × 15e12 = 6.30e+24 FLOPs
Effective rate
4,096 × 989 TFLOPS × 40% = 1620.38P FLOP/s
Time
FLOPs ÷ effective rate = 45.0 days
GPUs for deadline
ceil[FLOPs ÷ (989e12 FLOP/s × 40% × 30 days × 86,400 s/day)] = 6,144
Static memory
70e9 × 16 B = 1.1 TB

This dense-model estimate omits the context-dependent attention term. The chosen MFU must use the same FLOPs convention. Communication and recomputation already reduce measured MFU; do not deduct them twice. Add downtime outside the measurement interval, storage, networking and other charges separately when planning a schedule or budget.

Use the result to make a decision

Start with a dense-model compute estimate, then test how time and cost change with utilization. The default MFU is illustrative. A measured MFU already reflects communication and recomputation in its timing interval; add only overhead outside that interval. Check the memory layout and parallelism before treating a GPU count as deployable.

Questions people ask

For dense parameter matrix multiplications, the approximation counts two FLOPs per parameter per token in forward and four in backward. The PaLM paper derives this convention and a separate attention term. This calculator omits that context-dependent term. Sparse models, long-context workloads and other architectures need a workload-specific FLOPs estimate.