Inference & Serving · 2022
FlashAttention (1/2/3): IO-Aware Exact Attention
Computes exact attention with an IO-aware tiling and online-softmax algorithm that avoids materializing the full attention matrix in GPU high-bandwidth memory, removing the memory and bandwidth bottleneck that made long sequences slow and costly.
Editorial record
Plain-language summary
The kernel splits queries, keys, and values into blocks that fit in fast on-chip SRAM, computes softmax incrementally with running statistics, and recomputes intermediates during the backward pass instead of storing them, so memory scales linearly rather than quadratically in sequence length. This yields wall-clock speedups and lower memory use without approximation, giving identical results to standard attention. It enabled training and serving with longer context windows and became a default attention implementation in mainstream frameworks.
Knowledge graph
Relationships
Antecedents
CombinesEvidence: Strongly supported
PagedAttention / vLLM
vLLM pairs paged KV with flash attention
P-401
Makes efficientEvidence: Strongly supported
Ring Attention / Infini-Attention / MLA
Ring attention extends flash attention across devices
P-422
Descendants
Makes efficientEvidence: Direct
Attention Is All You Need
FlashAttention makes exact attention IO-efficient
P-400
Source record
Provenance
- Record ID
- P-400
- Record created
- 2026-07-13
- Last reviewed
- 2026-07-14
- Record version
- 2
- https://arxiv.org/abs/2205.14135
- arXiv:2205.14135
Citation caveat: Citation metadata is approximate and marked unverified in the source dataset.