FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
Dao, Fu, Ermon, Rudra, Ré
2022 NeurIPS 2022
TL;DR
Reorder the attention computation into tiled blocks that fit in GPU SRAM so you avoid materializing the full attention matrix in HBM. Same math, much faster, much less memory.