FLOP, FLOPs, FLOPS, IsoFLOP: A practical guide to compute accounting

1. Four acronyms, three different units

The deep learning literature uses FLOP, FLOPs, FLOPS, and IsoFLOP almost interchangeably, but they refer to three fundamentally different quantities. Mixing them up leads to off-by-an-order-of-magnitude mistakes when you compare papers, plan training runs, or read a GPU spec sheet. The disambiguation:

  • FLOP (singular) โ€” one FLoating-point OPeration. A single +, โˆ’, ร—, or รท on floating-point numbers. This is a count of one atomic event, so it almost never appears alone outside of explanations like this paragraph.
  • FLOPs (plural, lowercase s) โ€” FLoating-point OPerations, a cumulative count over some workload. Units: dimensionless count (often written as 1018 FLOPs, ExaFLOPs, ZettaFLOPs). This is the natural unit for how much compute did training this model cost.
  • FLOPS or FLOP/s (capital S, or with a slash) โ€” FLoating-point OPerations per Second, a rate. Units: FLOPssecond. This is the natural unit for how fast is this GPU. Modern accelerators are rated in TeraFLOPS (1012) or PetaFLOPS (1015).
  • IsoFLOP โ€” not a unit at all, but an experimental protocol: hold total training FLOPs constant and vary something else (model size, data, hyperparameters) to find an optimum on a fixed compute budget.

The shorthand:

FLOPsย (work)ย =ย FLOPSย (rate)ย ร—ย timeย .

A H100 SXM rated at 989 TFLOPS of BF16 dense throughput, run for one hour, performs at most 989ร—1012ร—3600โ‰ˆ3.56ร—1018 FLOPs of useful work โ€” call this 3.56 ExaFLOPs. At most, because real workloads almost never sustain peak throughput; see Section 4.

2. Counting FLOPs in a transformer forward pass

The atomic operation in deep learning is the matrix multiplication. For ๐ดโˆˆโ„๐‘šร—๐‘˜ and ๐ตโˆˆโ„๐‘˜ร—๐‘›, computing ๐ถ=๐ด๐ต takes

FLOPs(๐ด๐ต)=2๐‘š๐‘›๐‘˜

The factor of 2 comes from each output element requiring ๐‘˜ multiplications and ๐‘˜โˆ’1โ‰ˆ๐‘˜ additions. People sometimes call a fused multiply-add a single "operation" and write ๐‘š๐‘›๐‘˜ instead โ€” this is the source of the most common factor-of-two discrepancy between papers. Modern accelerators implement FMA in hardware but report throughput counting each FMA as 2 FLOPs, so the 2๐‘š๐‘›๐‘˜ convention is the one that matches vendor spec sheets.

For a decoder-only transformer with ๐‘ non-embedding parameters processing a sequence of length ๐‘‡, the forward pass cost decomposes into:

  • Linear projections (QKV, output projection, two MLP layers): every parameter is touched once per token, costing 2๐‘๐‘‡ FLOPs total.
  • Attention scores and values (the ๐‘„๐พโŠค and softmax-weighted ๐‘‰ steps): 2ยท2ยท๐‘›ย layerย ยท๐‘›ย headย ยท๐‘‘ย headย ยท๐‘‡2 FLOPs.

For models where ๐‘‡<12๐‘‘ย model, the attention term is a small correction and the widely cited approximation holds:

๐ถforwardย โ‰ˆ2๐‘๐‘‡(perย sequenceย ofย lengthย ๐‘‡)

Per token, that is 2๐‘. The backward pass is conventionally costed at 4๐‘ per token (one gradient flow into the inputs, one into the weights), giving the famous Kaplan/Chinchilla estimate for total training compute:

๐ถtrainย โ‰ˆ6๐‘๐ท

where ๐ท is the total number of training tokens. This single formula โ€” six FLOPs per parameter per training token โ€” is the backbone of every modern scaling-law paper.

A concrete instance: a 70B-parameter model trained on 2T tokens spends approximately 6ร—7ร—1010ร—2ร—1012=8.4ร—1023 FLOPs, or 0.84 YottaFLOPs. On a cluster sustaining 1 ExaFLOPS of effective throughput, that is about 10 days of wall-clock time.

3. Where the 6๐‘๐ท formula bends

The 6๐‘๐ท rule is an approximation, and it leaks in three predictable places.

First, activation checkpointing. Recomputing activations during the backward pass to save memory adds another forward pass per checkpointed segment, pushing the per-token cost from 6๐‘ toward 8๐‘. This is a deliberate trade: paying โ‰ˆ33% more compute to fit a larger model in memory.

Second, long context. The attention ๐‘‡2 term is no longer negligible when ๐‘‡ is large. A 1M-token sequence makes attention the dominant cost even for trillion-parameter models, and the 6๐‘๐ท formula understates compute by a factor that grows linearly in ๐‘‡.

Third, Mixture-of-Experts. In an MoE model with ๐‘total total parameters and ๐‘active activated per token (e.g., DeepSeek-V3's 671B total / 37B active), training compute scales with ๐‘active, not ๐‘total. The relevant accounting is ๐ถโ‰ˆ6๐‘ย activeย ๐ท, while memory and bandwidth scale with ๐‘total. This is exactly why MoE is attractive: you buy capacity at memory prices, not compute prices.

4. FLOPS as a hardware spec: peak, sustained, and "useful"

A vendor's headline FLOPS number is peak theoretical throughput under ideal conditions โ€” typically dense matrix multiplications at the lowest supported precision, with the on-chip tensor cores fully utilized. Real workloads see something much lower. The gap between peak FLOPS and what you actually get out of a training run is large enough that the field invented a dedicated vocabulary for it.

4.1. Achieved FLOPS, MFU, and HFU

Three utilization metrics get conflated in practice, and the differences matter:

  • Achieved FLOPS โ€” the raw observed rate of useful FLOPs per second during a run. If your training step processes ๐ต tokens in ๐‘ก seconds on a dense model of ๐‘ params, achieved FLOPS โ‰ˆ6๐‘๐ต๐‘ก.
  • Model FLOPs Utilization (MFU) โ€” achieved FLOPS divided by peak FLOPS, summed over all accelerators:
MFUย =ย usefulย modelย FLOPsย perย stepย ๐‘›gpuย ยทย FLOPSย ย peakย ยท๐‘กย step=6๐‘๐ต๐‘›gpuย ยทย FLOPSย ย peakย ยท๐‘กย step
  • Hardware FLOPs Utilization (HFU) โ€” same denominator, but the numerator counts every FLOP the chip executed, including redundant work:
HFUย =ย allย FLOPsย executedย perย step๐‘›gpuย ยทย FLOPSย ย peakย ยท๐‘กย step

The numerator distinction is the whole point. Activation checkpointing recomputes a forward pass during the backward to save memory: those FLOPs run on the silicon (counted in HFU) but do not appear in the 6๐‘๐ท model accounting (not counted in MFU). So HFUย โ‰ฅย MFU always, and a wide gap is a signal that your training is paying for recomputation, speculative decoding, or kernel-level redundancy that is not buying you direct optimization progress.

The PaLM paper popularized MFU specifically because peak FLOPS is a misleading bragging right โ€” what matters is how much of that peak survives the journey through memory bandwidth, all-reduce collectives, and pipeline bubbles. MFU is the single number that lets you compare training efficiency across model sizes, hardware generations, and parallelism strategies on an equal footing.

4.2. What sits between peak FLOPS and MFU

A 100% peak number erodes through a stack of friction layers, in roughly decreasing order of damage on a modern training cluster:

  1. Memory-bound operations. LayerNorm, softmax, dropout, residual adds, and the entire attention ๐‘„๐พโŠคย /ย ๐‘‰ kernel at small sequence lengths are limited by HBM bandwidth, not tensor-core throughput. They contribute a small percentage of total FLOPs but a large percentage of wall-clock time.
  2. Communication overhead. All-reduce gradients across data-parallel ranks, all-gather weights/activations under tensor parallelism, point-to-point sends under pipeline parallelism. Even on NVLink/InfiniBand fabrics, the GPU sits idle during the un-overlapped portion of every collective.
  3. Pipeline bubbles. With ๐‘ pipeline stages and ๐‘š micro-batches per step, the bubble fraction is โ‰ˆ๐‘โˆ’1๐‘+๐‘šโˆ’1. Small ๐‘š (memory-constrained) directly burns peak FLOPS.
  4. Optimizer and overhead steps. Adam updates, gradient clipping, weight casting, checkpoint saves. These are tiny in FLOPs but block the step boundary.
  5. Dataloading and host-side overhead. Tokenization, shuffling, host-to-device transfers, kernel launch latency โ€” visible as stalls if the input pipeline is not perfectly overlapped.

A useful diagnostic frame: budget your ๐‘กstep across these buckets with a profiler (Nsight Systems, PyTorch profiler) and check whether MFU losses match where the timeline says time is spent. If the bubble math says 15% but you are losing 30% of peak, the gap is elsewhere.

4.3. When you actually need MFU vs HFU

A short decision rule:

  • Comparing two training runs on the same hardware: use MFU. It strips out implementation choices like recomputation that change "how much silicon you bought" without changing model progress.
  • Diagnosing hardware-level inefficiency: use HFU. The gap to peak tells you whether your kernels are getting near the tensor cores at all.
  • Comparing inference stacks: use MBU (single-stream) or tokens/sec/$ (throughput). Achieved FLOPS hides whether you are even on the right roofline.
  • Reporting cost/efficiency in a paper: report MFU and the absolute achieved FLOPS, so readers can sanity-check both your model accounting and your hardware assumptions.

5. IsoFLOP: holding compute constant to find what to vary

IsoFLOP is not a unit โ€” it is the protocol that made Chinchilla famous (Hoffmann et al., 2022). The question it answers: given a fixed compute budget ๐ถ, what allocation of parameters ๐‘ and tokens ๐ท minimizes loss?

The procedure:

  1. Pick several compute budgets ๐ถ1<๐ถ2<โ€ฆ<๐ถ๐‘˜ (each spanning roughly one order of magnitude).
  2. At each ๐ถ๐‘–, train multiple models with different (๐‘,๐ท) pairs all satisfying 6๐‘๐ท=๐ถ๐‘–.
  3. Plot final loss as a function of ๐‘ (or equivalently ๐ท=๐ถ๐‘–6๐‘). This is an IsoFLOP curve: each curve corresponds to one compute budget and traces out the loss-vs-allocation trade.
  4. Find the minimum of each curve; call this ๐‘โ‹†(๐ถ๐‘–).
  5. Fit a power law ๐‘โ‹†โˆ๐ถ๐‘Ž across compute budgets. Chinchilla found ๐‘Žโ‰ˆ0.5, implying ๐‘โ‹†โˆ๐ทโ‹† โ€” model size and tokens should scale equally as compute grows.

This was a sharp departure from the earlier Kaplan scaling laws, which had recommended scaling parameters about three times faster than data. The difference came from a methodological choice: Kaplan held learning-rate schedule fixed and varied ๐‘ with ๐ท very large; Chinchilla's IsoFLOP design varied both jointly under fixed compute, which is the actual constraint a training team faces.

IsoFLOP is now standard for any scaling claim. A modern paper will report IsoFLOP frontiers showing how a new architecture, optimizer, or data mixture moves the loss-vs-compute curve down โ€” a comparison that is only meaningful when the FLOPs axis really is held constant.