FlashAttention
Computes exact attention with reduced memory traffic using tiling and online softmax.
Method
Tile Q,K,V into on-chip memory; accumulate softmax statistics and outputs without storing the full attention matrix; recompute needed blocks in backward pass.
Applications
Transformer training and inference.
Advantages
Reduces memory use and high-bandwidth-memory accesses.
Limitations
Hardware/kernel constraints; dense attention arithmetic remains quadratic in sequence length.
Alternatives
Standard attention kernels, sparse or linear attention.
Example
Train longer sequences without storing all attention scores.
Editorial clarification
Reviewed against method-specific primary or specialist reference; guarantees are conditional.
Sources
Educational reference only, not professional advice.
All algorithms