Flash Attention reduces GPU memory reads/writes by tiling attention computation and recomputing softmax in fast on-chip SRAM, achieving 2-4x speedups without approximation and linear memory scaling for long sequences.
Open the full topic