Back to the reading lists

    Deep learning· 2022

    FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness

    Tri Dao (first author) · 2022

    Read the original

    DOI 10.52202/068431-1189arXiv 2205.14135OpenAlex W7133227460

    Move attention in tiles.

    On the reading lists

    Why it matters

    Revolutionized exact attention through IO-aware tiling, enabling faster training and longer contexts.

    Condensed from the expert lists' notes.

    Inside the paper

    The problem
    Standard attention on long sequences creates large intermediate matrices and moves them between levels of GPU memory. Reducing arithmetic alone does not necessarily reduce elapsed time when memory traffic is the bottleneck.
    The idea
    FlashAttention reorganizes exact attention around the limited fast memory available on a GPU. It processes blocks of the inputs and combines partial softmax results without writing the full attention matrix to slower memory.
    How it works
    • Divide the query, key and value matrices into blocks sized for fast on-chip memory.
    • Load blocks and calculate portions of attention scores and output on chip, maintaining running quantities needed to normalize the softmax correctly.
    • Write the resulting output and compact normalization information to high-bandwidth memory without materializing the full score matrix there.
    • During the backward pass, recompute attention blocks from the saved information instead of storing the entire intermediate matrix.
    What it showed
    The paper reports faster attention and end-to-end training on several benchmarks, and uses longer sequences to improve results on tasks in its experiments. Its analysis also bounds memory accesses for the proposed algorithm under the stated memory model.
    Read it for
    Read Section 2 for the hardware and standard attention baseline, then Algorithm 1 and Section 3 for the blockwise calculation. Section 4 gives the measured results; the detailed proofs can wait until you need the bounds.

    Written in our own words from the paper itself. A draft the editors have not yet reviewed.

    Reading it

    Difficulty: Advanced

    Read this first: the Transformer (Attention Is All You Need); GPU memory hierarchy basics.

    The record

    First released
    2022 (from arXiv 2205.14135)
    Citations
    5,579 citations, as counted by Papers With Code (CC BY-SA 4.0)
    Named by
    both expert lists
    Also relevant to
    Language, speech & LLMs
    Score
    0.693 · computed rank 77 · consensus 0.92, must-read 1, citations percentile 0.906 (2020s · deep-learning), awards 0, existing lists 0. Method

    Editor's notes

    • Readability check: pass: Teaches the lasting lesson that memory movement, not arithmetic, limits modern models. (AI draft (Claude), not yet reviewed, 2026-10-29)

    Data sources

    Catalogue data from OpenAlex (CC0), Crossref (CC0 metadata; no abstracts are shown), arXiv, and Papers With Code (CC BY-SA 4.0). Each count names its source. See the method.