FLAMIA: FLAsh MIcroscaling Attention for Fast and Causally Safe Training on Blackwell
Fedor Velikonivtsev, Mikhail Koltakov, Denis Kuznedelev
Key points
From the paper's conclusion- We present FLAMIA, a family of attention kernels for Blackwell with MXFP8 and mixed NVFP4/FP8 training paths.
Abstract
Attention remains a substantial computational cost in Transformer training, particularly at long context lengths. NVIDIA Blackwell GPUs provide high-throughput low-precision matrix multiplication, but exploiting it in attention requires addressing quantization overhead, causal information leakage through shared scales, and numerical inconsistencies between the forward and backward passes. We present FLAMIA, a family of attention kernels for Blackwell with MXFP8 and mixed NVFP4/FP8 training paths. Our design combines token-block scaling that reuses quantized operands across matrix orientations, targeted safeguards against scale-induced leakage, and consistent forward and backward computations. Fused quantization and architecture-specific kernel optimizations reduce overhead, while document-local scaling and workload-aware scheduling support variable-length documents directly in packed layouts without repacking. Across various causal packed-document workloads, the MXFP8 path accelerates the combined forward and backward attention call, including quantization, by factors of $1.10$--$1.40\times$ on B200 and $1.06$--$1.42\times$ on B300 relative to the fastest evaluated baseline for each workload. We validate training stability and quality preservation on pretraining Llama-style models. These results show how jointly designing quantization, training numerics, and document scheduling translates low-bit hardware throughput into practical attention acceleration.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- LampAttention: Look-Ahead Mixed-Precision FlashAttention for Dedicated AcceleratorsarXiv · 2026
- An Empirical Study of Issues in GPU Kernel Libraries for LLM SystemsarXiv · 2026
- ZYFA: Speed and Accuracy of FP8 FlashAttention on AMD CDNA4arXiv · 2026
- A Method for Layer Bit-Width Allocation in LLM Quantization via Performance Maximization Under a Quality-Degradation ConstraintarXiv · 2026
- NVFP4-MLA: Unified FP4 KV-Cache Storage and Attention Computation for Multi-Head Latent AttentionarXiv · 2026
- Delta-Matching: Closing the Final Gap of Native 8-bit Training for LLMsarXiv · 2026