Jargonautica
Language Models Specifically

Flash Attention

Also called: FlashAttention

A rewritten implementation of attention that gets the same answer far faster by being careful about how it moves numbers around the chip. It changed nothing about what models can do and a great deal about what they cost, which is why it was adopted almost universally within a year.

Technical view

Computes attention in tiles that fit in fast on-chip memory, avoiding materialising the full attention matrix in slower high-bandwidth memory, and recomputes what is needed during the backward pass rather than storing it. This makes memory use linear rather than quadratic in sequence length and gives large wall-clock speedups. It is exact, not an approximation, which is why it replaced the previous generation of efficient-attention research.


Part of AI Terminology Index, section: Language Models Specifically.

How it connects

Flash Attention links to 6 other terms. The faint lines are links between those terms. See it in the full graph.

Context WindowContext WindowAttentionAttentionSparse AttentionSparse AttentionMemory BandwidthMemory BandwidthCompilation and Kernel FusionCompilation and Ker…Paged AttentionPaged AttentionFlash Attention