Home Tools Glossary FlashAttention
Technique

FlashAttention

FlashAttention Algorithm

/flash-uh-ten-shun/

An IO-aware exact attention algorithm that accelerates transformer training and inference by optimizing GPU memory access.

In plain English
FlashAttention is like a smart librarian who organizes books so efficiently that they never have to make slow trips back to the warehouse storage shelf, speeding up reading times exponentially.
Real-world example
Training transformers with exceptionally long context windows while cutting GPU memory bandwidth overhead.
Technical definition
FlashAttention is an IO-aware exact attention algorithm that computes softmax reductions online without materializing the large attention matrix in high-latency global GPU HBM memory. By leveraging SRAM tiling and recomputation during backward passes, it reduces memory read/write bottlenecks, achieving significant speedups and enabling massive context windows.