A Masked Future Is Not a Hidden Future: Keeping MXFP8 Attention Causal
Abstract
Causal attention must prevent future tokens from influencing earlier predictions, including during parallel training and prompt prefill. Its cost grows quadratically with sequence length, making lower-precision arithmetic an attractive way to accelerate these computations. MXFP8 enables fast eight-bit matrix products on NVIDIA Blackwell GPUs, but sharing quantization scales across tokens can break causality. In Transformer Engine's stock MXFP8 attention, a masked future token can change how an earlier value is rounded and alter an earlier prediction. We demonstrate this dependency in released language models and present a causal attention kernel that removes it. Within value blocks containing both visible and future tokens, our kernel uses token-local scales and folds them into the corresponding attention weights, retaining native MXFP8 for both forward matrix products. We support training with a causal dequantized-input backward and inference with an MXFP8 KV cache. On Qwen3-4B-Base at 32K context, our kernel reduces full-sequence versus prefix disagreement on the most likely next token from 0.416% to 0.021%, close to the BF16 reference of 0.015%. In end-to-end Qwen3-4B training at 32K, our recipe improves throughput by 4.9% and reduces peak memory by 5.2% relative to BF16. For single-request inference, it improves Qwen3-4B decode throughput by 3.8-9.9% over vLLM with FP8 attention and an FP8 KV cache at 4K-32K context, with broadly comparable throughput on Qwen3-14B.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI
- Comments
- All authors contributed equally and are listed alphabetically by given name
Related papers
KEEP: Dynamic Expert Sparsification for Mixture-of-Experts Models
Shared title terminologycs.LGMaximilian Kleinegger, Dan Alistarh
Stiefel-Projected 4D Tucker Fast-Weight Memory: Zero-SVD Cubic-Kernel Linear Attention, Exact Subspace Unlearning and O(1) Multi-Hop Retrieval
Shared title terminologycs.LGShubham Barmase
Fisher-Rao Geodesic Attention: Spherical and Hyperbolic Attention from Information Geometry
Shared title terminologycs.LGEduardo Quiñelen Rojas, Miguel Contreras Torrejon
Field-Time Transformers: Universal Model Architecture for Imperfect-Information Games by Structured Attention
Shared title terminologycs.LGZhiyuan Fan, Gabriele Farina
Where, What, and How to Forget: A Causal-Geometric Framework for Selective Capability Unlearning
Shared title terminologycs.LGAkash Das, Ishan Roy
SpecZip: Efficient Speculative Drafter Training on Compressed Hidden-State Caches
Shared title terminologycs.LGMinsub Kim, Jaeeun Kil, Sungjae Lee et al.