Flash Attention (FlAttn)

A faster way to compute attention that avoids slow memory transfers by working in small tiles, speeding up training without changing the results.

Technically: Flash Attention (Dao et al., 2022) reformulates standard attention using tiling and online softmax to keep intermediate results in fast on-chip SRAM rather than writing them back to high-bandwidth memory (HBM). It is exact, not approximate, while sharply reducing HBM traffic, giving wall-clock speedups and supporting much longer contexts. Flash Attention 2 and 3 extend it with better GPU warp-level scheduling and FP8 support.

Category: Attention Mechanisms

Related ideas