How to Estimate GPU-Hours for a Training Run
Booking GPU capacity before you know the size of your run is how budgets blow up. A good estimate starts with the arithmetic of training compute, then translates that into hours on real silicon. Below is the method most teams use internally, plus the padding rules that keep you from underbidding your own cluster reservation.
The FLOPs approach for dense transformers
For a standard dense transformer, total training compute follows a clean rule of thumb: roughly 6 x params x tokens. The 6 comes from counting the floating-point operations each parameter does per token. The forward pass costs about 2 FLOPs per parameter (one multiply, one add). The backward pass costs about twice that, near 4 FLOPs per parameter, because you compute gradients with respect to both the activations and the weights. Add them and you land at 6 FLOPs per parameter per token.
So a model with P parameters trained on T tokens needs about 6PT floating-point operations. This ignores some second-order costs like attention over very long sequences, but for sizing a run at the planning stage it holds up well. Plug in your parameter count and your token budget and you have the total compute the run will demand, before any hardware enters the picture.
Converting FLOPs to GPU-hours
A datasheet number like "989 teraFLOPS" describes peak throughput under ideal conditions you will never see in practice. What you actually sustain is governed by Model FLOPs Utilization, or MFU, which is the fraction of peak you keep once memory bandwidth, communication overhead, and pipeline bubbles take their cut. Well-tuned large training runs typically land between 0.3 and 0.5. If you have no measured number, assume something in that band and revise once you profile.
Effective throughput is peak FLOPS times MFU. To get wall-clock hours on a single GPU, divide total FLOPs by effective FLOPS, then divide by 3600 to convert seconds into hours:
GPU-hours = (6 x params x tokens) / (peak FLOPS x MFU x 3600)
That gives you single-GPU-hours. If you run across N accelerators, the calendar time is roughly that figure divided by N, assuming your scaling stays efficient. Note that GPU-hours is the unit providers bill on, so this is the number you carry into a pricing comparison.
A worked example: 7B model on 1 trillion tokens
Take a 7-billion-parameter model trained on 1 trillion tokens, on H100-class GPUs. Start with the compute:
- params = 7e9, tokens = 1e12
- Total FLOPs = 6 x 7e9 x 1e12 = 4.2e22
Now the hardware. An H100 in BF16 peaks near 989 teraFLOPS, call it 9.89e14 FLOPS, and we will assume an MFU of 0.4 for a reasonably tuned run. Effective throughput is 9.89e14 x 0.4 = 3.96e14 FLOPS.
- GPU-seconds = 4.2e22 / 3.96e14 = about 1.06e8 seconds
- GPU-hours = 1.06e8 / 3600 = about 29,500 GPU-hours
On a single H100 that is over three years, which is why nobody does it that way. Spread across 256 H100s at the same efficiency, you finish in roughly 115 hours, just under five days. If your real MFU comes in at 0.3 instead of 0.4, that same run stretches to about 39,000 GPU-hours, so the assumption you pick moves the budget by a third.
Fine-tuning and inference sizing
Fine-tuning uses the same 6PT formula, but the token count drops by orders of magnitude. A full fine-tune might touch tens of millions to a few billion tokens instead of a trillion, so the compute scales down accordingly. The choice of method matters too. A full fine-tune updates every weight and carries the full 6 FLOPs per parameter. LoRA freezes the base model and trains small adapter matrices, so the backward pass only computes gradients for a tiny slice of parameters. Your forward pass still runs through the whole model, but the trainable-parameter count that drives optimizer memory and gradient compute can fall by 90 percent or more. That is why people reach for LoRA when they want to fit a fine-tune on a single node, often with gradient checkpointing to trade extra compute for lower activation memory.
Inference sizing works from a throughput target rather than a token total. Decide how many tokens per second you need to serve at peak. Benchmark one GPU at your target batch size and sequence length to learn its sustained tokens per second under load. Divide your required throughput by that per-GPU number and round up, then add headroom for traffic spikes and key-value cache pressure at long context. If one H100 serves 2,000 tokens per second for your model and you need 25,000, that is 13 GPUs before redundancy, so call it 15 or 16 to leave slack.
What it means for buyers
Your first number will be wrong, and almost always low. Real runs lose time to crashed nodes, checkpoint reloads, evaluation passes between epochs, and the hyperparameter sweeps you run before committing to a final config. Build that reality into the estimate before you reserve anything:
- Pad raw GPU-hours by 20 to 50 percent to absorb restarts and failed jobs.
- Budget separate hours for evals and for every sweep arm you plan to launch.
- Use a conservative MFU (closer to 0.3) when you have not yet profiled the model.
- Recompute once you have a measured throughput number from a short pilot run.
Once you have a padded GPU-hour figure, the last step is price. Compare GPU pricing across providers on the FlopSource directory to turn your GPU-hours into a real dollar budget.
Compare providers for your workload
Live pricing, hardware specs, and availability across 30 GPU clouds, neoclouds, and bare-metal providers.
Open the Directory