Skip to main content

Why is FlashAttention faster?

Why is FlashAttention faster? It moves far less data between GPU high-bandwidth memory and fast on-chip memory.

It still computes standard softmax attention. The speed comes from tiling, online softmax, and kernel fusion, which avoid writing the full token-by-token attention matrices to HBM.

The arithmetic count stays quadratic in sequence length. The expensive memory traffic drops because intermediate scores and probabilities remain in small on-chip tiles.

In this article

  • Why is FlashAttention faster on long sequences?
  • The 4K-token traffic FlashAttention avoids
  • Tiling keeps intermediates close to compute
  • Online softmax keeps the answer exact
  • Extra computation can still finish sooner
  • Kernel fusion removes stage boundaries
  • Why FlashAttention is not always faster
  • FlashAttention is not KV-cache compression
  • Read the profiler as memory traffic

Continue reading

This field note is part of Fanout Pro, with the complete archive, courses, labs, and every Daily paper guide.

See plans