Summary
The paper presents FLAMIA, a family of low-precision FlashAttention-4-derived kernels for NVIDIA Blackwell (B200/B300) with two training paths: MXFP8 everywhere, and a mixed path in which uses NVFP4 and the remaining products use E4M3. The central numerical idea is token-block scaling: one power-of-two exponent per 32 tokens full head dimension (and per block for dS). This makes the quantized payload transposition-invariant, so one E4M3 copy serves both MMA orientations needed in the forward and backward passes.
Beyond speed, the paper argues that low-bit attention training has two neglected failure modes. First, scales shared across positions can leak future-token information through the quantizer despite the causal mask. Second, mismatches between forward and backward quantized intermediates destabilise training even when single-step cosines are high. It proposes mitigations: upward-rounded exponents, per-key V scales on diagonal tiles, K folding, and opt-in "exact options" plus a causal dQ scale for batched causal calls. It also adds kernel engineering (fused quantization, MUFU/MMA overlap, low-bit 2-CTA backward), document-local scaling with a GPU scheduler for packed documents, and two bit-level exponentials for inference only.