FLOPs vs FLOP/s: fill in the counts versus rate distinction.
FLOPs is a count of operations; FLOP/s is a rate. Prefill does many FLOPs and is compute-bound, while decode does few FLOPs per byte read and is bandwidth-bound.
Imagine measuring how much running someone does. You can count total steps taken, a pure number with no clock attached. Or you can measure steps per second, which only makes sense alongside a stopwatch. FLOPs and FLOP/s are exactly that pair. FLOPs is the count of math operations a job needs, like asking how many steps fit in a marathon. FLOP/s is how fast a chip can do math, like asking how fast a runner moves. The interesting question is whether a chip spends its time waiting on data or actually doing math. When the prompt is processed all at once, the chip is busy computing. When the model produces output one word at a time, the chip is mostly waiting for data from memory.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: nail the count versus rate distinction, give the 2NT forward-pass estimate, anchor peak FLOP/s for H100 and B200 across dtypes, place prefill and decode on the roofline using arithmetic intensity, then close with how to use the pair to localise bottlenecks.
Real products, models, and research that use this idea.
- NVIDIA H100 SXM peak is roughly 990 TFLOP/s BF16 and 1980 TFLOP/s FP8, the headline numbers in every Hopper spec sheet.
- Llama 4 Maverick forward pass at 4k context costs roughly 4 to 5 PFLOPs total, the figure used by serving teams to size GPU pools.
- DeepSeek V4 published training FLOPs estimates around 6e24, comparable to recent frontier models, justifying the use of large H200 clusters.
- B200 Blackwell GPUs roughly double H100 FP8 FLOP/s, which is why frontier labs migrated training and serving to them through 2025.
- Roofline analyses for vLLM and TensorRT-LLM publish achieved FLOP/s curves against batch size, showing decode climbing from below 1 percent of peak toward saturation.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy is the transformer forward pass FLOPs estimate 2NT and not just NT?
QWhy does FP8 nearly double the H100 peak FLOP/s versus BF16?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating FLOPs and FLOP/s as synonyms. The first is a job size; the second is a hardware throughput rate. Confusing them produces nonsense like saying an H100 has 990 trillion FLOPs.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.