What is Model FLOPs utilization (MFU)?
The percentage of hardware peak performance achieved, computed from the operations a model actually requires.
Japanese name: MFU
The percentage of hardware peak performance achieved, computed from the operations a model actually requires.
Japanese name: MFU
MFU (model FLOPs utilization) expresses the achieved compute throughput, calculated from the operations the model inherently requires, as a percentage of the hardware's peak performance. Training a Transformer with N parameters is taken to need about 6N operations per token. Multiplying the tokens processed per second by 6N gives the effective throughput, which is then divided by the combined peak performance of the accelerators used. For example, a system with 1,000 PFLOPS of combined peak that achieves 400 PFLOPS effective has an MFU of 40%. Attention operations are sometimes added to the count.
A similar metric is HFU (hardware FLOPs utilization). HFU counts every operation the hardware actually executed, including the extra operations from activation recomputation (gradient checkpointing) used to save memory. MFU counts only the operations the model requires, so recomputation does not raise MFU and in fact lowers it by taking extra time. HFU shows how busy the hardware was, while MFU shows how much useful computation progressed, which makes MFU better for fairly comparing training systems with different implementations. MFU was proposed in the paper on the PaLM large language model.
In real training, MFU never approaches 100%, and large-scale training is often said to stay at a few tens of percent. Factors that lower it include waiting on communication between GPUs, idle time at the start and end of pipeline-parallel schedules (bubbles), memory-bound operations such as normalization and activation functions, slow data loading, and time spent recovering from failures or saving checkpoints. Peak performance also varies greatly with precision, for example whether it is counted in FP8 or BF16, so values cannot be compared without checking which precision's peak was used as the denominator.
MFU is used as a gauge of how much changes to training settings or software have helped. Engineers vary the parallelization scheme, number of microbatches, kernel optimizations that fuse operations, and overlap of communication with computation, and watch how MFU changes. A high MFU, however, is not the same as faster training overall. Switching to a model or algorithm that reaches the same quality with fewer operations can finish training sooner even if MFU drops. For inference, decoding tends to be bound by memory bandwidth, so it is more often evaluated by memory-bandwidth utilization or cost per token than by compute utilization.
Answer: A. The percentage of hardware peak performance achieved, computed from the operations the model actually requires
MFU derives the rate of useful computation from tokens processed per second and the operations the model requires, then divides it by the GPUs' peak performance. Communication waits, memory-bound operations, pipeline bubbles and recomputation all lower it. Because it shows how well the hardware is used, it guides improvements to training configuration and software.
A metric showing the achieved compute throughput, calculated from the operations the model inherently needs for training, as a percentage of the hardware's peak performance. It indicates how effectively the hardware's performance is being used.
HFU counts every operation the hardware actually executed, including activation recomputation. MFU counts only the operations the model requires and excludes extra work such as recomputation. Because both are divided by the same peak, HFU is always at least as high as MFU.
For Transformer training, multiply about 6N operations per token (N being the parameter count) by the tokens processed per second to get effective throughput, then divide by the combined peak performance of the hardware used. It is important to state which precision's peak performance was used.
As an Amazon Associate I earn from qualifying purchases.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.