FlashAttention kernel numerics are fragile: large-number subtraction problem persists

YouJiacheng · x · 2026-10-04

A technical discussion on attention kernel numerical stability: the author argues the FA kernel implementation is fragile, since exp(sij - lse) is effectively a delta of large numbers, and even the alternative that separates the lse and uses c (S - m) - log(l) still contains a large-number subtraction in (S - m).

Related event: FlashAttention's Numerical Fragility Sparks Discussion(2 posts)→

Original post →

More from Infra

Infra channel →