Current attention kernels compute all logits in uniform precision, missing the opportunity to use lower precision for most computations without harming numerical stability. LampAttention introduces a mixed-precision FlashAttention that accumulates key-query products and evaluates exponentials in 8-bit by default, then adaptively identifies and recomputes numerically sensitive sub-blocks in 16-bit.
Simulated experiments with Qwen3 and Gemma 3 show that rerouting only a minority of sub-blocks to high precision is sufficient to recover full baseline model performance. This is significant because it demonstrates a path to substantial computational savings on future dedicated accelerators that support native 8-bit accumulation, without requiring changes to weights or activations.