advanced32 min studyLesson 594 in Engineering

A utilization percentage is meaningful only with its FLOP and time conventions

Define useful model FLOPs, executed recomputation, eligible peak throughput, and completed time before comparing training utilization.

On this page

What you’ll understand

  • Compute model FLOPs utilization with a consistent global denominator.
  • Distinguish useful model arithmetic from additional executed recomputation.
  • Check precision, dense versus sparse peak, and forward/backward accounting conventions.

Model FLOPs utilization divides a declared amount of useful model arithmetic by the arithmetic capacity available during measured elapsed time. Every term needs a convention. Different formulas can include different attention work, backward work, padding, or recomputation while using the same acronym. A percentage without that definition cannot support a fair system comparison. High device activity, high executed arithmetic, and high throughput of useful training tokens are related measurements, but they do not describe the same quantity.

Count the model work the experiment promises

Define whether a multiply-add counts as two FLOPs and specify the operations included in forward and backward execution. A simple parameter-based estimate can be convenient for some dense architectures, but it is not an exact law for attention at every sequence length, sparse experts, embeddings, or every optimizer. State how padding, ignored tokens, and variable sequence lengths enter the count. If the numerator is estimated from tokens, make sure those tokens match the work whose elapsed time is measured rather than mixing useful tokens with an unrelated padded-work formula.

For a global completed step, use global model work and the total eligible device peak over that same wall interval. Do not divide a global numerator by one device's peak, or multiply an already per-device arithmetic estimate by device count twice. The peak must match the arithmetic mode being evaluated, including dtype and the convention for structured sparsity. A marketed peak for an unused mode is not a neutral denominator. Heterogeneous devices require the sum of their stated eligible peaks rather than one device peak times rank count.

MFU⁡=FmodelT∑r=1DPr\operatorname{MFU}=\frac{F_{\rm model}}{T\sum_{r=1}^{D}P_r}
F_model is declared useful model FLOPs per global completed step, T is seconds per that step, and P_r is each participating device's eligible FLOP/s peak under matching arithmetic conventions. This dimensionless accounting ratio is neither hardware occupancy nor a direct measurement of achieved instructions. Its usefulness depends on an accurate numerator and consistent denominator.↔ Scroll wide equations horizontally.

Recomputation increases executed work without adding useful model work

Activation recomputation can save memory by evaluating some forward operations again during backward execution. Under a useful-model convention, those repeated operations do not increase the numerator simply because the hardware performed them. They can increase a separately defined executed-work or hardware-FLOPs ratio. A configuration can therefore have a higher executed-arithmetic fraction while delivering fewer useful training tokens per second. Compare memory capacity, completed time, and convergence-relevant work alongside the accounting ratios rather than ranking methods by whichever percentage is largest.

Forward and backward cost should come from the chosen model formula or an explicit operation analysis; assuming backward is exactly twice forward is an approximation for particular workloads. Optimizer and auxiliary work may belong outside a paper's model-FLOPs numerator even though their time belongs in the end-to-end denominator. Declare these choices. Profiler FLOP estimates may cover only selected operation families, so adding available estimates is not automatically a complete training computation count. Validate coverage and avoid treating an uncounted operation as if it consumed no arithmetic or time.

Fexec=Fmodel+Frecompute+Fextra,Uexec=FexecT∑rPrF_{\rm exec}=F_{\rm model}+F_{\rm recompute}+F_{\rm extra},\qquad U_{\rm exec}=\frac{F_{\rm exec}}{T\sum_rP_r}
This is an explicitly chosen decomposition with all terms counted under the same FLOP convention and without double counting. Extra work may include operations excluded from the useful-model definition. U_exec is an accounting ratio here, not a claim that every publication uses exactly this hardware-utilization definition or that instruction counters directly equal the formula.↔ Scroll wide equations horizontally.

Audit suspicious improvements before comparing percentages

Record the model configuration, batch and sequence distribution, accumulation, precision, recomputation policy, hardware peak source, and measured completion boundary. Recompute the numerator when architecture or work changes. If a calculated percentage exceeds one, inspect operation conventions, eligible peaks, device count, timing, and estimator accuracy; do not interpret it as evidence that hardware exceeded a physical arithmetic limit. Compare actual valid token or sample throughput and quality as well. A changed denominator can improve a displayed ratio without accelerating any training work.

The roofline lab uses a related but different synthetic ceiling. Reset, set both I=4 FLOP/byte and B=100 decimal GB/s, predict 400 GFLOP/s, then Play. The fixed compute roof is 1000 GFLOP/s, so its attainable ceiling is 40% of that roof. Reset and set both I=20 and B=100 to reach the 1000 cap. These ratios are ceilings for selected hypothetical intensities, not measured MFU. The instrument has no model work, forward/backward split, device count, tokens, recomputation, or completed-step timing from which real training utilization could be calculated.

Useful-model and executed-work ratios differ under recomputation

A hypothetical four-device job has eligible dense peak 100 TFLOP/s per device. A global completed step takes 0.5 s. Its declared useful work is 24 TFLOP forward plus 56 TFLOP backward, and recomputation adds 20 TFLOP. Other work is excluded from both arithmetic numerators but included in elapsed time.

  1. Useful model work is 24+56=80 TFLOP per step. The available arithmetic capacity over the interval is 4×100×0.5=200 TFLOP, with the same decimal tera convention throughout.

  2. MFU under this definition is 80/200=0.4, or 40%. The backward count is the supplied operation analysis, not an assumed universal forward-to-backward multiplier.

  3. Executed counted work is 80+20=100 TFLOP, so its separately defined ratio is 100/200=50%. The extra ten percentage points represent repeated arithmetic, not additional useful model progress.

The result

Both percentages can be correct under explicit definitions. Neither replaces a valid-work throughput, memory, and quality comparison between configurations.

Explore the model

Interactive lab

Interactive lab · roofline

A fraction of a synthetic roof is not measured MFU

Reset, set both I=4 FLOP/byte and B=100 decimal GB/s, predict ceiling 400 GFLOP/s, or 40% of the fixed 1000 compute roof, then Play. Reset and re-enter both I=20 and B=100 for the 1000 cap. This min(1000,B×I) display contains no model FLOPs, device count, recomputation, tokens, or measured completion time.

A fraction of a synthetic roof is not measured MFUSynthetic roofline ceiling min(1000, B·I), in GFLOP/s, with B in decimal GB/s and I in FLOP/byte. Playback traces the roof without changing the selected kernel. This upper-bound model is not a measured throughput prediction, hardware comparison or price model. Current readings: Attainable ceiling: 640 GFLOP/s; Ridge intensity: 12.5 FLOP/byte; Ceiling regime: Memory-bound ceiling. All parameters are adjustable with the labeled controls below.Hypothetical roofline upper bound: 640 GFLOP per second at operational intensity 8 FLOP per byte and bandwidth 80 gigabytes per second.0.1110641101001000Operational intensity · FLOP/byte · log scaleCeiling · GFLOP/s · log scalePeak: 1000
Attainable ceiling / kernelBandwidth roof / traceCompute ceiling
Attainable ceiling
640 GFLOP/s
Ridge intensity
12.5 FLOP/byte
Ceiling regime
Memory-bound ceiling
t = 0 s

Synthetic roofline ceiling min(1000, B·I), in GFLOP/s, with B in decimal GB/s and I in FLOP/byte. Playback traces the roof without changing the selected kernel. This upper-bound model is not a measured throughput prediction, hardware comparison or price model. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forReport what the numerator, capacity denominator, and timing boundary actually count.

Check your understanding

A job adds activation recomputation while useful model work is unchanged. Under this lesson's definitions, what can happen?

Try it yourself

Two hypothetical devices each have eligible peak 80 TFLOP/s. A global step contains 48 TFLOP of declared model work and takes 0.6 s. Compute MFU. What wrong ratio results from mistakenly using only one device's peak?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Capacity during the step is time multiplied by the sum of participating eligible peaks.

Compare with the solution

The proper capacity is 0.6×(80+80)=96 TFLOP and MFU is 48/96=50%. Using only one device gives 48/(0.6×80)=100%, a factor-of-two accounting error. The result assumes the work and peaks share arithmetic conventions and the measured interval completes that global step.

Take it with you

  • Specify useful arithmetic, eligible peak mode, participating devices, and elapsed-time boundary together.
  • Recomputation can raise counted executed work without increasing useful model progress.
  • Compare explicit accounting ratios alongside valid throughput, memory, and task quality.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.