Original title: Hardware-Aware FP4 FlashAttention-4
Robert Hu · September 2026
New Blackwell computer chips can do math with tiny 4-bit numbers called FP4, but using them does not automatically make attention calculations faster. Attention helps models focus on relevant data. Once the core math shrinks, converting values with a function called softmax and waiting on chip data transfers take up most of the time. To solve this, researchers built two methods. First, Direct-P turns attention scores straight into FP4 probabilities during inference, reaching up to 2.13$\times$ the bfloat16 speed on an NVIDIA GB200. Second, for causal tasks, their method saves quantized inputs to rebuild probabilities later. This speeds up a full single-GPU 8-billion-parameter model update by up to 1.14$\times$. However, training runs using MXFP4 probabilities and values failed and diverged.
Imagine packing for a trip with a tiny bag that only holds essentials. You need to bring everything important, but if you try to cram items in normally, some get crushed or left behind. Here, the system is trying to fit attention calculations into very low-precision data formats to save space and time. The usual way of compressing causes errors that ruin the output. In this paper, a new packing method is invented that directly places the most critical parts without losing them, making the entire process much faster.
This makes large AI models run faster and cheaper on new hardware, reducing the time and cost for companies and researchers who build and deploy them. It directly accelerates both inference and training, speeding up AI development cycles.
The abstract does not establish that this method works for all attention types or hardware; results are specific to NVIDIA GB200 for noncausal inference and causal training with FP8. MXFP4 probability/value training diverges, indicating a limit to the precision reduction for training. The approach is demonstrated for 8-billion-parameter models, and generalizability to other sizes or architectures is not discussed.
Ask anything about this paper. Answers come from its abstract, and say so when the abstract doesn't cover your question.
Hardware-Aware FP4 FlashAttention-4 — Robert Hu
Abstract licence: CC0
Explanation generated by Synthesis from the abstract — it is not the original paper. This is a preprint, so it hasn't necessarily been peer reviewed.