FLAMIA:用于Blackwell上快速且因果安全训练的闪存微缩放注意力

·

研究论文 · 2026/11/03

FLAMIA 是一套针对 NVIDIA Blackwell GPU 的注意力内核,支持 MXFP8 和混合 NVFP4/FP8 训练路径。它通过令牌块缩放、防止因果信息泄漏的安全措施以及前后向计算一致性,解决了量化开销和数值不一致问题。在因果打包文档工作负载中,MXFP8 路径将包含量化的前向和后向注意力调用加速 1.10-1.40 倍(B200)和 1.06-1.42 倍(B300)。在 Llama 风格模型预训练中验证了训练稳定性和质量保持。

该工作展示了如何通过联合设计量化、训练数值和文档调度,将低比特硬件吞吐转化为实际的注意力加速,对长上下文 Transformer 训练有重要价值。

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.40times on B200 and 1.06--1.42times 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.

阅读原文

参与讨论