PreprintCited by 1,280Parallel Computing and Optimization TechniquesAdvanced Neural Network ApplicationsTopic Modeling

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

Open access
Dao, Tri, Fu, Daniel Y., Ermon, Stefano, Rudra, Atri, Ré, Christopher·2022·arXiv

Abstract

Machine learning's explosive growth has produced a proliferation of accelerator architectures, yet no framework maps a workload's computational character to the hardware that serves it best. We build that framework: decomposing ML workloads — transformers, CNNs, GNNs, diffusion and state-space models — into core compute primitives characterized by arithmetic intensity, memory-access pattern, and parallelism, and evaluating how GPUs, TPUs, systolic arrays, dataflow processors, wafer-scale engines, and neuromorphic chips serve them. Using hierarchical roofline and utilization modelling, we show the binding constraint has shifted from peak FLOPS to memory bandwidth and data-movement energy — which quantization only sharpens — and consolidate eight persistent, unsolved problems. These motivate the central contribution: the Fused Memory-Compute Tile (FMCT, codename Habanero), an SRAM-first, HBM-free accelerator combining a three-mode (GEMM / bandwidth / fused) phase-adaptive tile switched by compiler directive, a non-linear unit fused into the systolic datapath, compute-in-memory as a selectable mode rather than the whole architecture, and an inline KV-cache compression engine. A validated component-level energy model shows ~4-7× batch-1 efficiency gains over HBM GPUs. We position FMCT against its closest SRAM-first, no-HBM analogs — d-Matrix Corsair and Tenstorrent — and OpenAI's HBM-retaining Jalapeño ASIC, closing with principles for memory-centric, workload-adaptive accelerators.

AI snapshot

Written from the paper’s full text.

TL;DR

FlashAttention is an IO-aware exact attention algorithm that uses tiling and recomputation to avoid materializing the large \(N \times N\) attention matrix in GPU HBM, reducing memory reads/writes while computing exact attention. It speeds up Transformer training and enables longer contexts, including first better-than-chance Transformer results on Path-X and Path-256.

Key findings

  • FlashAttention requires fewer HBM accesses than standard attention: \(\Theta(N^2 d^2 M^{-1})\) vs. \(\Theta(Nd + N^2)\), and is up to 9× fewer HBM accesses for typical \(d\) and \(M\).
  • It trains models faster: 15% end-to-end wall-clock speedup on BERT-large (seq. length 512) over the MLPerf 1.1 record, up to 3× speedup on GPT-2 (seq. length 1K), and 2.4× on Long-Range Arena (seq. length 1K–4K).
  • Longer context improves quality: 0.7 better perplexity on GPT-2 and 6.4 points of lift on long-document classification; FlashAttention achieves 61.4% accuracy on Path-X (16K), and block-sparse FlashAttention achieves 63.1% on Path-256 (64K).
  • Attention benchmarking: FlashAttention is up to 3× faster than standard attention for common sequence lengths and up to 20× more memory efficient than exact attention baselines; block-sparse FlashAttention is faster than all existing approximate attention methods tested.

Methods

  • Algorithm design: exact attention computed by tiling Q, K, V blocks into on-chip SRAM, incrementally performing softmax reduction, and recomputing attention in the backward pass from stored softmax statistics instead of storing the \(N \times N\) attention matrix.
  • Analysis: proves IO complexity for forward and backward passes, plus a lower bound showing no exact attention algorithm can asymptotically improve HBM accesses over all SRAM sizes; extends to block-sparse FlashAttention with IO complexity scaled by sparsity.
  • Experiments: CUDA implementation benchmarked on A100, RTX 3090, and T4 GPUs; trained BERT-large, GPT-2, Long-Range Arena, MIMIC-III, ECtHR, Path-X, and Path-256, comparing runtime, memory, and accuracy against exact, approximate, and sparse attention baselines.

Limitations

  • The paper states that building IO-aware attention implementations currently requires writing a new CUDA kernel for each new attention implementation, using a lower-level language than PyTorch, with significant engineering effort, and implementations may not transfer across GPU architectures.
  • The paper states its IO-aware implementation is optimal within constants for single-GPU attention, but multi-GPU attention adds another memory hierarchy and is left as future work.
  • The paper states the lower bound is proved over a subrange of SRAM sizes \(M\), and parameterized complexity lower bounds in terms of \(M\) are left as future work; the text also makes evident that some approximate attention methods become faster than FlashAttention beyond sequence length 1K, though block-sparse FlashAttention remains faster than all tested approximate methods.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2205.14135

Cites

0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Claims the paper makes

40 of 48 cited sources checked · 12 supported · 1 flagged · accuracy not yet measured

  • Findingown data
    § Abstract

    FlashAttention requires fewer HBM accesses than standard attention.

    “We analyze the IO complexity of FlashAttention , showing that it requires fewer HBM accesses than standard attention, and is optimal for a range of SRAM sizes.”
    • Also stated in: § 1 Introduction · boosted
      “We analyze the IO complexity [1] of FlashAttention , proving that it requires 𝑂 𝑁 2 𝑑 2 𝑀 1 HBM accesses where 𝑑 is the head dimension and 𝑀 is the size of SRAM, as compared to Ω 𝑁𝑑 𝑁 2 of standard attention.”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites [1] [1] Alok Aggarwal and S Vitter, Jeffrey. The input/output complexity of sorting and related problems. Communications of the ACM , 31(9):1116-1127, 1988. - source

      The Introduction and Section 3 describe I/O bounds for sorting-related problems and transfers between disk and internal memory. A search of our copy for FlashAttention, HBM, SRAM, and attention found no passage comparing FlashAttention with standard attention, so it cannot verify the claimed reduction in HBM accesses. (LLM, conf=0.78)

      Experimental — accuracy not yet measured
  • Findingown data
    § Abstract

    FlashAttention trains Transformers faster than existing baselines: 15% end-to-end wall-clock speedup on BERT-large (seq length 512) compared to the MLPerf 1.1 training speed record.

    “FlashAttention trains Transformers faster than existing baselines: 15% end-to-end wall-clock speedup on BERT-large (seq. length 512) compared to the MLPerf 1.1 training speed record, 3 speedup on GPT-2 (seq. length 1K), and 2.4 speedup on long-range arena (seq. length 1K-4K).”
    • Also stated in: § 1 Introduction · plain
      “We train BERT-large (seq. length 512) 15% faster than the training speed record in MLPerf 1.1 [58]”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites [58] [58] Peter Mattson, Christine Cheng, Gregory Diamos, Cody Coleman, Paulius Micikevicius, David Patterson, Hanlin Tang, Gu-Yeon Wei, Peter Bailis, Victor Bittorf, et al. Mlperf training benchmark. Proceedings of Machine Learning and Systems , 2:336-349, 2020. - source

      Section 3.2 (p. 6) describes MLPerf’s end-to-end time-to-train metric, supporting the identification of MLPerf as a training benchmark. But Section 5 (p. 9) reports only rounds v0.5 and v0.6; our copy does not establish a v1.1 BERT-large speed record or a 15% FlashAttention speedup against it. (LLM, conf=0.84)

      Experimental — accuracy not yet measured
  • Findingown data
    § Abstract

    FlashAttention achieves 3x speedup on GPT-2 (seq length 1K) compared to baselines.

    “3 speedup on GPT-2 (seq. length 1K)”
    • Also stated in: § 1 Introduction · plain
      “GPT2 (seq. length 1K) 3 faster than baseline implementations from HuggingFace [87] and Megatron-LM [77]”
    Quote in the paperSubstantial claim2 of 2 sources checked
    • cites [87] [87] Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations , pages 38-45, Online, October 2020. Association for Computational Linguistics. URL https://www source

      The Deployment section reports speedups from ONNX optimization of models including GPT-2, but does not discuss FlashAttention. Searches for FlashAttention and a 3x speedup at sequence length 1K found no passage addressing the claimed result; the ONNX result does not verify or contradict it. Page numbers were unavailable in our copy. (LLM, conf=0.76)

      Experimental — accuracy not yet measured
    • cites [77] [77] Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-LM: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053 , 2019. - source

      Appendix D.2 (p. 14) reports a 2.98-fold training speedup for a 1.2-billion-parameter model using eight GPUs rather than one. That result concerns model parallelism, not FlashAttention; the passage does not specify a 1K sequence length or the claimed baseline comparison. (LLM, conf=0.83)

      Experimental — accuracy not yet measured
  • Findingown data
    § 1 Introduction

    FlashAttention requires O(N^2 d^2 M^{-1}) HBM accesses where d is head dimension and M is SRAM size, compared to Ω(Nd + N^2) of standard attention.

    “We analyze the IO complexity [1] of FlashAttention , proving that it requires 𝑂 𝑁 2 𝑑 2 𝑀 1 HBM accesses where 𝑑 is the head dimension and 𝑀 is the size of SRAM, as compared to Ω 𝑁𝑑 𝑁 2 of standard attention.”
    • Also stated in: § 3.2 Analysis: IO Complexity of FlashAttention · plain
      “Theorem 2. Let 𝑁 be the sequence length, 𝑑 be the head dimension, and 𝑀 be size of SRAM with 𝑑 𝑀 𝑁𝑑 . Standard attention (Algorithm 0) requires Θ 𝑁𝑑 𝑁 2 HBM accesses, while FlashAttention (Algorithm 1) requires Θ 𝑁 2 𝑑 2 𝑀 1 HBM accesses.”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites [1] [1] Alok Aggarwal and S Vitter, Jeffrey. The input/output complexity of sorting and related problems. Communications of the ACM , 31(9):1116-1127, 1988. - source
  • Findingcitation
    § Abstract

    FlashAttention enables the first Transformers to achieve better-than-chance performance on Path-X (seq length 16K, 61.4% accuracy).

    “the first Transformers to achieve better-than-chance performance on the Path-X challenge (seq. length 16K, 61.4% accuracy)”
    • Also stated in: § 1 Introduction · plain
      “FlashAttention enables the first Transformer that can achieve better-than-chance performance on the Path-X [80] challenge, solely from using a longer sequence length (16K).”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites [80] [80] Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena: A benchmark for efficient transformers. In International Conference on Learning Representations , 2020. - source

      Section 2.2.6 (p. 4) identifies Path-X as a 16K-input benchmark, and Section 3.3 (p. 7) reports that the models tested achieved at best 50%. The paper does not report FlashAttention achieving 61.4% or establish that it was the first Transformer to exceed chance on Path-X. (LLM, conf=0.90)

      Experimental — accuracy not yet measured
  • May combine two claims. 48
  • Classified as probably not a substantial claim. 19
  • May combine two claims.

    Premisecitation
    § 3.3 Extension: Block-Sparse FlashAttention

    For large sequence lengths N, s is often set to N^{-1/2} or N^{-1} log N, resulting in Θ(N sqrt N) or Θ(N log N) IO complexity.

    “For large sequence lengths 𝑁 , 𝑠 is often set to 𝑁 1 2 [11] or 𝑁 1 log 𝑁 [3, 17, 92], resulting in Θ 𝑁 𝑁 or Θ 𝑁 log 𝑁 IO complexity.”
    Quote in the paperNot a substantial claim4 of 4 sources checked
    • cites [11] [11] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509 , 2019. - source

      The citation to Child et al. is attached to the logarithmic-complexity option. Instead, Section 4.3 (p. 4) chooses a stride close to √N, and Section 4.2 (p. 4) gives O(N√N) computation. The paper does not give the attributed Θ(N log N) IO complexity. (LLM, conf=0.85)

      Checked by a reasoning model — may be wrong.

      Experimental — accuracy not yet measured
    • cites [3] [3] Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150 , 2020. - source

      Section 3.1 (p. 3) gives sliding-window attention a computation complexity of O(n × w) for a fixed window size. Our copy does not say that sparsity s is set to N⁻¹ log N or give a Θ(N log N) IO complexity; a search for those terms found no supporting passage. (LLM, conf=0.73)

      Experimental — accuracy not yet measured
    • cites [17] [17] Tri Dao, Beidi Chen, Kaizhao Liang, Jiaming Yang, Zhao Song, Atri Rudra, and Christopher Ré. Pixelated butterfly: Simple and efficient sparse training for neural network models. In International Conference on Learning Representations (ICLR) , 2022. - source

      Section 3.2 (p. 5) says flat butterfly matrices have O(n log k) nonzeros; with maximum stride k = n, this supports an O(N log N) sparsity pattern. The Problem Formulation (p. 17) relates memory accesses to nonzero blocks. The paper does not state that s is often set to either claimed value, or establish the stated Θ IO complexities, including the Θ(N√N) case. (LLM, conf=0.78)

      Experimental — accuracy not yet measured
    • cites [92] [92] Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for longer sequences. Advances in Neural Information Processing Systems , 33, 2020. - source

      Section 2 (pp. 3–4) describes sparse attention and its reduced complexity, including attention to a limited number of random keys. It does not specify a sparsity fraction of (log N)/N or establish Θ(N log N) IO complexity; the Θ(N√N) alternative is attached to a different citation in the citing sentence. (LLM, conf=0.76)

      Experimental — accuracy not yet measured
  • May combine two claims.

    Findingcitation
    § Abstract

    FlashAttention and block-sparse FlashAttention enable longer context in Transformers, yielding higher quality models (0.7 better perplexity on GPT-2 and 6.4 points of lift on long-document classification).

    “FlashAttention and block-sparse FlashAttention enable longer context in Transformers, yielding higher quality models (0.7 better perplexity on GPT-2 and 6.4 points of lift on long-document classification) and entirely new capabilities: the first”
    • Also stated in: § 1 Introduction · plain
      “We observe a 0.7 improvement in perplexity on GPT-2 and 6.4 points of lift from modeling longer sequences on long-document classification [13].”
    • Also stated in: § 4 Experiments · plain
      “Modeling longer sequences yields 6.4 points of lift on two longdocument classification tasks.”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites [13] [13] Xiang Dai, Ilias Chalkidis, Sune Darkner, and Desmond Elliott. Revisiting transformer-based models for long document classification. arXiv preprint arXiv:2204.06683 , 2022. - source

      The Introduction and Conclusions report that processing more text can improve long-document classification, and §3.1 describes Longformer as a way to process longer sequences. Our copy does not attribute those gains to FlashAttention or block-sparse FlashAttention, and it does not report the claimed 0.7 GPT-2 perplexity improvement or 6.4-point classification lift (searched those terms and figures). Page numbers were not available in our copy. (LLM, conf=0.86)

      Experimental — accuracy not yet measured
  • May combine two claims.

    Premisereasoning
    § Abstract

    Approximate attention methods reduce compute complexity by trading off model quality but often do not achieve wall-clock speedup.

    “Approximate attention methods have attempted to address this problem by trading off model quality to reduce the compute complexity, but often do not achieve wall-clock speedup.”
    • Also stated in: § 1 Introduction · plain
      “Although these methods reduce the compute requirements to linear or near-linear in sequence length, many of them do not display wall-clock speedup against standard attention and have not gained wide adoption.”
    Quote in the paperSubstantial claim5 of 5 sources checked
    • cites [51] [51] Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In The International Conference on Machine Learning (ICML) , 2020. - source

      The Introduction (p. 1) says LSH attention reduces complexity from O(L²) to O(L log L), and the synthetic-task analysis (p. 5) reports accuracy losses in some settings. But the paper does not support the claim that approximate attention methods often fail to achieve wall-clock speedups; its Experiments section (p. 9) reports that LSH attention remains fast as sequence length increases while regular attention slows. (LLM, conf=0.87)

      Experimental — accuracy not yet measured
    • cites [74] [74] Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers. Transactions of the Association for Computational Linguistics , 9: 53-68, 2021. - source

      The Abstract says sparse attention reduces compute complexity, and §6.1 reports that local attention was slightly worse than full attention on CIFAR-10. Section 6.3 supports a qualified wall-clock concern: Routing Transformer was slower than local attention on the reported TPU tests. But local attention was faster than full attention, and some Routing Transformer configurations were faster too, so the paper does not establish that approximate attention methods generally fail to achieve wall-clock speedups. (LLM, conf=0.84)

      Experimental — accuracy not yet measured
    • cites [12] [12] Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. In International Conference on Learning Representations (ICLR) , 2020. - source

      The Introduction and Related Work (p. 1) describes more tractable attention methods and limitations that can affect their representation power or accuracy. Section 2.2 (p. 3) shows reduced time complexity for the paper’s approximate attention mechanism. But the paper does not say that approximate methods often fail to achieve wall-clock speedups; Section 4.1 (p. 6) instead reports lower wall-clock time for its own method. (LLM, conf=0.84)

      Experimental — accuracy not yet measured
    • cites [50] [50] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are RNNs: Fast autoregressive transformers with linear attention. In International Conference on Machine Learning , pages 5156-5165. PMLR, 2020. - source

      The Introduction (p. 1) says sparse attention and locality-sensitive hashing reduce computational complexity but do not speed up autoregressive inference. That supports the speed claim only for that setting: the paper also says these methods can be trained efficiently on long sequences, and it does not establish a general trade-off in model quality. (LLM, conf=0.86)

      Experimental — accuracy not yet measured
    • cites [84] [84] Sinong Wang, Belinda Z Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768 , 2020. - source

      The Introduction (p. 1) says sparse attention reduces complexity but incurs a performance drop, while Reformer’s efficiency gains appear only for sequences longer than 2048 tokens. The claim overstates the wall-clock point for sparse attention: the paper reports a limited but real 20% speedup, not no speedup. (LLM, conf=0.85)

      Experimental — accuracy not yet measured
  • May combine two claims.

    Findingreasoning
    § B.5 Comparison with Rabe and Staats [66]

    Rabe and Staats [66] focuses on reducing total memory footprint while FlashAttention focuses on reducing memory accesses.

    “The first major difference is that Rabe and Staats [66] focuses on the reducing the total memory footprint (maximum amount of GPU memory required) while FlashAttention focuses on reducing memory accesses (the number of memory reads/writes).”
    Quote in the paperNot a substantial claim1 of 1 sources checked
    • cites Rabe and Staats [66] source
  • May combine two claims.

    Premisecitation
    § 4.2 Better Models with Longer Sequences

    In prior work, all transformer models have either run out of memory or only achieved random performance on Path-X and Path-256.

    “In prior work, all transformer models have either run out of memory, or only achieved random performance [80].”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites [80] [80] Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena: A benchmark for efficient transformers. In International Conference on Learning Representations , 2020. - source

      The Quantitative Results (p. 7) say that all models evaluated on Path-X failed, achieving at best 50% accuracy, consistent with chance performance. The paper does not establish this for all transformer models or for Path-256, and the cited passages do not say that any Path-X model ran out of memory. (LLM, conf=0.88)

      Experimental — accuracy not yet measured
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Premisecitation
    § 4.2 Better Models with Longer Sequences

    LRA accuracy results are highly dependent on the tuning procedure.

    “3 LRA accuracy results are known to be highly dependent on the tuning procedure [90].”
    Quote in the paperNot a substantial claim1 of 1 sources checked
    • cites [90] [90] Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas Singh. Nyströmformer: A nystöm-based algorithm for approximating self-attention. In Proceedings of the AAAI Conference on Artificial Intelligence. AAAI Conference on Artificial Intelligence , volume 35, page 14138, 2021. - source

      The Long Range Arena Benchmark section (p. 8) describes the evaluation setup and reports accuracy, but does not say that accuracy is highly dependent on the tuning procedure. Searches for LRA tuning and hyperparameter sensitivity found a sensitivity discussion only for MRPC, a different task (Fine-tuning on Downstream NLP tasks, p. 7). (LLM, conf=0.76)

      Experimental — accuracy not yet measured
  • May combine two claims.

    Findingreasoning
    § B.5 Comparison with Rabe and Staats [66]

    FlashAttention is faster than standard attention (2-4×) while Rabe and Staats [66] is around the same speed or slightly slower than standard attention.

    “As a result, FlashAttention is faster than standard attention (2-4 ) while Rabe and Staats [66] is around the same speed or slightly slower than standard attention.”
    Quote in the paperNot a substantial claim1 of 1 sources checked
    • cites Rabe and Staats [66] source
  • Probably not a substantial claim: may not pass S3 (load-bearing). May combine two claims.

    Premisecitation
    § A Related Work

    Even though structured matrices are efficient in theory, they have not seen wide adoption since it is hard to translate their efficiency to wall-clock speedup since dense unconstrained matrix multiply has very optimized implementation, a phenomenon known as the hardware lottery.

    “However, even though structured matrices are efficient in theory, they have not seen wide adoption since it is hard to translate their efficiency to wall-clock speedup since dense unconstrained matrix multiply has very optimize implementation, a phenomenon known as the hardware lottery [41].”
    Quote in the paperNot a substantial claim1 of 1 sources checked
    • cites [41] [41] Sara Hooker. The hardware lottery. arXiv preprint arXiv:2009.06489 , 2020. - source

      Split into 2 atoms — 0 confirmed, 2 partially supported, 0 disputed, 0 misattributed, 0 unverifiable. Expand the claim to see per-atom verdicts.

      Experimental — accuracy not yet measured
  • May combine two claims.

    Findingreasoning
    § B.5 Comparison with Rabe and Staats [66]

    FlashAttention simplifies the backward pass analytically, only recomputes the attention matrix and does not recompute the temporary output of each block, reducing memory requirement for the backward pass and yielding speedup compared to Rabe and Staats [66].

    “FlashAttention instead simplifies the backward pass analytically (Appendices B.2 and B.4). It only recomputes the attention matrix and does not recompute the temporary output of each block. This reduces the memory requirement for the backward pass and yields speedup.”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites Rabe and Staats [66] source

      Split into 2 atoms — 0 confirmed, 2 partially supported, 0 disputed, 0 misattributed, 0 unverifiable. Expand the claim to see per-atom verdicts.

      Experimental — accuracy not yet measured
  • May combine two claims.

    Findingown data
    § 4.1 Faster Models with FlashAttention

    GPT-2 small and medium using FlashAttention achieve up to 3x speedup compared to Huggingface and up to 1.7x compared to Megatron-LM.

    “Table 2 shows up to 3 endto-end speedup compared to Huggingface and 1.7 speedup compared to Megatron-LM.”
    • Also stated in: § 4.1 Faster Models with FlashAttention · plain
      “GPT-2 small and medium using FlashAttention achieve up to 3 speed up compared to Huggingface implementation and up to 1.7 compared to Megatron-LM.”
    Quote in the paperSubstantial claim2 of 2 sources checked
    • cites [87] [87] Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations , pages 38-45, Online, October 2020. Association for Computational Linguistics. URL https://www source

      The Deployment section reports a nearly 4× speedup using ONNX, not FlashAttention. Searches for the claimed 3× and 1.7× end-to-end comparisons found no such results in our copy; Related Work mentions Megatron-LM but does not benchmark against it. (LLM, conf=0.77)

      Experimental — accuracy not yet measured
    • cites [77] [77] Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-LM: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053 , 2019. - source
  • May combine two claims.

    Findingreasoning
    § B.5 Comparison with Rabe and Staats [66]

    FlashAttention has smaller total memory requirement compared to Rabe and Staats [66] because it incrementally updates the output after processing each block, needing only one copy instead of K copies for K blocks.

    “FlashAttention instead incrementally updates the output (Algorithm 1 line 12) after processing each block, so only one copy of the output is needed (instead of 𝐾 copies for 𝐾 blocks). This means that FlashAttention has smaller total memory requirement compared to Rabe and Staats [66].”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites Rabe and Staats [66] source

      Section 4 (p. 4) says the practical implementation keeps one summary per key/value chunk before rescaling them, producing √n summaries and O(√n) memory overhead. That supports the comparison with storing K intermediate results, but the paper does not establish the claimed smaller total memory requirement for FlashAttention. It also describes an O(log n)-memory self-attention algorithm in the Abstract (p. 1), so the comparison cannot be applied to all of its methods. (LLM, conf=0.84)

      Experimental — accuracy not yet measured
  • May combine two claims.

    Findingown data
    § 4.1 Faster Models with FlashAttention

    FlashAttention yields the fastest single-node BERT training speed known to the authors, 15% faster than Nvidia MLPerf 1.1.

    “FlashAttention yields the fastest single-node BERT training speed that we know of. We train a BERT-large [22] model with FlashAttention on Wikipedia. Table 1 compares our training time to the implementation from Nvidia that set the training speed record for MLPerf 1.1 [58]. Our implementation is 15% faster.”
    Quote in the paperSubstantial claim1 of 2 sources checked
    • cites [22] [22] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. 2019. - source
    • cites [58] [58] Peter Mattson, Christine Cheng, Gregory Diamos, Cody Coleman, Paulius Micikevicius, David Patterson, Hanlin Tang, Gu-Yeon Wei, Peter Bailis, Victor Bittorf, et al. Mlperf training benchmark. Proceedings of Machine Learning and Systems , 2:336-349, 2020. - source

      The citation is attached to the claim that an NVIDIA implementation set the MLPerf 1.1 training-speed record, not to the citing authors’ 15% comparison. The Results (p. 9) discuss only MLPerf v0.5 and v0.6; searches for MLPerf 1.1, NVIDIA, and BERT found no passage establishing the cited record. (LLM, conf=0.76)

      Experimental — accuracy not yet measured
  • Classified as probably not a substantial claim.

    Premisecitation
    § B.2 Memory-efficient backward pass

    The backward pass of attention can be done without quadratic extra memory by applying gradient checkpointing to the memory-efficient forward pass.

    “Rabe and Staats [66] suggests that the backward pass can be done without quadratic extra memory by applying gradient checkpointing to the memory-efficient forward pass.”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites Rabe and Staats [66] source
  • May combine two claims.

    Findingown data
    § 1 Introduction

    Block-sparse FlashAttention is 2-4x faster than even FlashAttention, scaling up to sequence length of 64k.

    “As a proof of concept, we implement block-sparse FlashAttention , a sparse attention algorithm that is 2-4 faster than even FlashAttention , scaling up to sequence length of 64k.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § Algorithm 1 FlashAttention

    Algorithm 1 returns O = softmax(QK^T)V with O(N^2 d) FLOPs and requires O(N) additional memory beyond inputs and output.

    “Theorem 1. Algorithm 1 returns O softmax QK V with 𝑂 𝑁 2 𝑑 FLOPs and requires 𝑂 𝑁 additional memory beyond inputs and output.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § Abstract

    FlashAttention is optimal for a range of SRAM sizes; no exact attention algorithm can asymptotically improve on the number of HBM accesses over all SRAM sizes.

    “and is optimal for a range of SRAM sizes.”
    • Also stated in: § 1 Introduction · plain
      “Moreover, we provide a lower bound, showing that no exact attention algorithm can asymptotically improve on the number of HBM accesses over all SRAM sizes.”
    • Also stated in: § 3.2 Analysis: IO Complexity of FlashAttention · plain
      “Proposition 3. Let 𝑁 be the sequence length, 𝑑 be the head dimension, and 𝑀 be size of SRAM with 𝑑 𝑀 𝑁𝑑 . There does not exist an algorithm to compute exact attention with 𝑜 𝑁 2 𝑑 2 𝑀 1 HBM accesses for all 𝑀 in the range 𝑑 𝑁𝑑 .”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingreasoning
    § 1 Introduction

    FlashAttention runs faster (up to 7.6x on GPT-2) and uses less memory-linear in sequence length-than standard attention, even with increased FLOPs due to recomputation.

    “Even with the increased FLOPs due to recomputation, our algorithm both runs faster (up to 7.6x on GPT-2 [67], Figure 1 right) and uses less memory -linear in sequence length-than standard attention, thanks to the massively reduced amount of HBM access.”
    Quote in the paperSubstantial claim0 of 1 sources checked
    • cites [67] [67] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog , 1(8):9, 2019. -

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • Rests on an assumption: All gradient checkpointing implementations known to the authors trade speed for memory.
  • May combine two claims.

    Findingown data
    § 1 Introduction

    FlashAttention is up to 3x faster than standard attention across common sequence lengths from 128 to 2K and scales up to 64K.

    “FlashAttention is up to 3 faster than the standard attention implementation across common sequence lengths from 128 to 2K and scales up to 64K.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 1 Introduction

    Up to sequence length of 512, FlashAttention is both faster and more memory-efficient than any existing attention method.

    “Up to sequence length of 512, FlashAttention is both faster and more memory-efficient than any existing attention method, whereas for sequence length beyond 1K, some approximate attention methods (e.g., Linformer) start to become faster.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4.3 Benchmarking Attention

    FlashAttention is up to 20× more memory efficient than exact attention baselines, and is more memory-efficient than the approximate attention baselines.

    “FlashAttention is up to 20 more memory efficient than exact attention baselines, and is more memory-efficient than the approximate attention baselines.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingreasoning
    § Algorithm 4 FlashAttention Backward Pass

    Standard attention backward pass requires Θ(Nd + N^2) HBM accesses, while FlashAttention backward pass requires Θ(N^2 d^2 M^{-1}) HBM accesses.

    “Theorem 5. Let 𝑁 be the sequence length, 𝑑 be the head dimension, and 𝑀 be size of SRAM with 𝑑 𝑀 𝑁𝑑 . Standard attention (Algorithm 0) backward pass requires Θ 𝑁𝑑 𝑁 2 HBM accesses, while FlashAttention backward pass (Algorithm 4) requires Θ 𝑁 2 𝑑 2 𝑀 1 HBM accesses.”
    • Also stated in: § C Proofs · plain
      “At each step of the standard attention backward pass, one needs to load inputs of size 𝑁𝑑 or 𝑁 2 from HBM, and needs to write the outputs of size 𝑁 2 or 𝑁𝑑 to HBM. This incurs Θ 𝑁𝑑 𝑁 2 HBM accesses.”
    • Also stated in: § C Proofs · plain
      “Similar to Theorem 2, we see that each element of K and V is loaded from HBM once. Each element of dK and dV is only written to HBM once. We make 𝑇 𝑐 passes over Q O dO , each pass loading all of Q O dO to HBM. We also make 𝑇 𝑐 passes over dQ , each pass reading/writing all of dQ from/to HBM. Therefore the number of HBM accesses is Θ 𝑁𝑑 𝑁𝑑𝑇 𝑐 Θ 𝑁𝑑𝑇 𝑐 .”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing), S4 (based).

    Findingnone given
    § 5 Limitations and Future Directions

    Our IO-aware implementation of attention is optimal within constants for computing attention on a single GPU.

    “Our IO-aware implementation of attention is optimal within constants for computing attention on a single GPU.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data
    § Algorithm 4 FlashAttention Backward Pass

    FlashAttention backward pass performs O(N^2) FLOPs and only requires O(N) extra memory beyond inputs, output, output gradient, and input gradients.

    “We see that similar to the forward pass, the backward pass performs 𝑂 𝑁 2 FLOPs and only requires 𝑂 𝑁 extra memory beyond inputs, output, output gradient, and input gradients.”
    Quote in the paperSubstantial claim
  • Classified as probably not a substantial claim.

    Findingnone given
    § 4.3 Benchmarking Attention

    The runtimes of many approximate/sparse attention mechanisms grow linearly with sequence length.

    “The runtimes of many approximate/sparse attention mechanisms grow linearly with sequence length, but FlashAttention still runs faster than approximate and sparse attention for short sequences due to fewer memory accesses.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingreasoning
    § Algorithm 3 Standard Attention Backward Pass

    FlashAttention backward pass does not need to store the dropout mask of size O(N^2) from the forward pass; saving PRNG states and regenerating the dropout mask in the backward pass allows only O(N) extra memory.

    “We do not need to store the dropout mask of size 𝑂 𝑁 2 from the forward pass. Instead, we can save the pseudo-random number generator states from the forward pass and re-generate the dropout mask in the backward pass. This allows us to only use 𝑂 𝑁 extra memory.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4.2 Better Models with Longer Sequences

    GPT-2 with FlashAttention and context length 4K is still 30% faster than GPT-2 from Megatron with context length 1K, while achieving 0.7 better perplexity.

    “Table 4 shows that that GPT-2 with FlashAttention and context length 4K is still 30% faster than GPT-2 from Megatron with context length 1K, while achieving 0.7 better perplexity.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4.2 Better Models with Longer Sequences

    Block-sparse FlashAttention enables Transformers to scale to sequence length 64K, achieving 63.1 accuracy on Path-256.

    “Additionally, block-sparse FlashAttention enables the Transformers to scale to sequence length 64K, achieving 63.1 accuracy 4 on Path-256.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4.3 Benchmarking Attention

    All other algorithms except for Linformer run out of memory on an A100 GPU before 64K, and FlashAttention is still 2× more efficient than Linformer.

    “All other algorithms except for Linformer run out of memory on an A100 GPU before 64K, and FlashAttention is still 2 more efficient than Linformer.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4.3 Benchmarking Attention

    FlashAttention and block-sparse FlashAttention have the same memory footprint, which grows linearly with sequence length.

    “FlashAttention and block-sparse FlashAttention have the same memory footprint, which grows linearly with sequence length.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data
    § 3.3 Extension: Block-Sparse FlashAttention

    Block-sparse FlashAttention achieves 2.8x speedup on the LRA benchmark while performing on par with standard attention.

    “On the LRA benchmark, block-sparse FlashAttention achieves 2.8 speedup, while performing on par with standard attention (Section 4).”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4.1 Faster Models with FlashAttention

    FlashAttention is as numerically stable as the baselines and produces the same training/validation curves.

    “Appendix E includes plots of the validation perplexity throughout training, confirming that FlashAttention is as numerically stable as the baselines and produces the same training / validation curves.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingnone given
    § 4.2 Better Models with Longer Sequences

    Both MIMIC-III and ECtHR contain very long text documents; the average number of tokens in MIMIC is 2,395 tokens, and the longest document contains 14,562 tokens, while the average and longest numbers in ECtHR are 2,197 and 49,392, respectively.

    “Both of these datasets contain very long text documents; the average number of tokens in MIMIC is 2,395 tokens, and the longest document contains 14,562 tokens, while the average and longest numbers in ECtHR are 2,197 and 49,392, respectively.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4 Experiments

    The runtime of block-sparse FlashAttention scales linearly in sequence length and is faster than all existing approximate attention baselines.

    “We confirm that runtime of block-sparse FlashAttention scales linearly in seq. length and is faster than all existing approximate attention baselines.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingreasoning
    § B Algorithm Details

    Attention forward and backward passes can be computed with O(n) extra memory, linear instead of quadratic in the sequence length.

    “We first derive the forward and backward passes of attention and show that they can be computed in a memory-efficient manner (requiring extra memory linear instead of quadratic in the sequence length).”
    • Also stated in: § B.1 Memory-efficient forward pass · plain
      “Therefore the forward pass can be computed with 𝑂 𝑛 extra memory:”
    • Also stated in: § B.2 Memory-efficient backward pass · plain
      “Therefore the backward pass can also be computed with 𝑂 𝑛 extra memory:”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § 4 Experiments

    The memory footprint of FlashAttention scales linearly with sequence length and is up to 3x faster than standard attention for common sequence lengths up to 2K.

    “We confirm that the memory footprint of FlashAttention scales linearly with seq. length and is up to 3 faster than standard attention for common seq. lengths (up to 2K).”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § E.5 Speedup On Different Hardware and Configurations

    On an RTX 3090 GPU with batch size 12 and 12 attention heads, FlashAttention speedup over standard PyTorch attention is between 2.5-4.5x, slightly higher than on an A100.

    “We observe slightly higher speedups on the RTX 3090 (between 2.5-4.5 ), since the memory bandwidth on an RTX 3090 is lower than on an A100 (roughly 900 GB/s vs. 1.5 TB/s).”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingreasoning
    § E.4 Comparison with Apex FMHA

    FlashAttention can support much longer sequences (e.g., up to length 64K), more head dimensions (16, 32, 64, 128), and broader GPU types (all Turing and Ampere GPUs at the time of writing).

    “As a result, we can support much longer sequences (e.g., up to length 64K). We also support more head dimensions (16, 32, 64, 128) and broader GPU types (all Turing and Ampere GPUs at the time of writing).”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data
    § E.2 GPT-2

    Training GPT-2 small takes between 2.7-9.5 days, and training GPT-2 medium takes between 6.9-21.0 days on 8 A100-40GB GPUs.

    “We train the model on 8 A100-40GB GPUs, and we measure the wall-clock training time. Training GPT-2 small takes between 2.7-9.5 days, and training GPT-2 medium takes between 6.9-21.0 days (Table 2).”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingreasoning
    § D.1 Block-sparse FlashAttention

    For block-sparse FlashAttention, the number of HBM accesses is scaled by s, the fraction of nonzero blocks in the block-sparsity mask, but for small s the result O must still be written.

    “For the block-sparse case, notice that we only need to load blocks corresponding to nonzero blocks. As a result, the number of HBM accesses are scaled by 𝑠 , the fraction of nonzero blocks in the block-sparsity mask. However, for small values of 𝑠 , we would still need to write the result O 𝑁 𝑑 . Therefore the number of HBM accesses is”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingnone given
    § E.6 Full Benchmarking Results

    Longformer and BigBird do not support sequence lengths longer than 8092.

    “Longformer and BigBird do not support sequence lengths longer than 8092.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingnone given
    § E.6 Full Benchmarking Results

    Local Attention's implementation only supports FP32.

    “We use FP16 for all measurements, except for Local Attention, whose implementation only supports FP32.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingnone given
    § E.3 LRA details

    After hyperparameter tuning, almost all attention methods achieve similar accuracy on all five LRA tasks.

    “After hyperparameter tuning, almost all of the attention methods achieve similar accuracy on all of the five LRA tasks.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingnone given
    § E.6 Full Benchmarking Results

    Block-Sparse (OpenAI) does not support sequence lengths longer than 4096.

    “Block-Sparse (OpenAI) does not support sequence lengths longer than 4096.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data
    § E.4 Comparison with Apex FMHA

    Compared to FMHA, overall runtime of FlashAttention is about 4% slower for sequence length 128, 8% faster for sequence length 256, and 5% faster for sequence length 512.

    “Compared to FMHA, the overall runtime of FlashAttention is about 4% slower for sequence length 128, 8% faster for sequence length 256, and 5% faster for sequence length 512.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Findingnone given
    § E.6 Full Benchmarking Results

    The Megatron implementation does not support sequence lengths longer than 2048.

    “The Megatron implementation does not support sequence lengths longer than 2048.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingreasoning
    § E.4 Comparison with Apex FMHA

    FlashAttention is slightly faster than FMHA in the forward pass and slightly slower than FMHA in the backward pass.

    “Generally FlashAttention is slightly faster than FMHA in the forward pass and slightly slower than FMHA in the backward pass.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingreasoning
    § E.4 Comparison with Apex FMHA

    FMHA stores the attention matrix softmax mask QK^T to HBM in the forward pass for gradient computation, so it does not offer substantial memory saving.

    “In the forward pass, it stores the attention matrix softmax mask QK 𝑇 to HBM to be used in gradient computation. As a result, it does not offer substantial memory saving (though for shorter sequences memory footprint is often not a primary concern).”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Findingown data
    § E.2 GPT-2

    FlashAttention behaves the same as the baseline HuggingFace implementation, with validation perplexity curves of the two implementations almost lying on top of each other.

    “We see that FlashAttention behaves the same as the baseline implementation and the validation perplexity curves of the two implementations almost lie on top of each other.”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing). May combine two claims.

    Findingown data
    § E.3 LRA details

    For Path-X, additional fine-tuning adds roughly 4 points of accuracy to FlashAttention, but the model starts overfitting afterwards.

    “For Path-X, we take the best performing checkpoint (according to val accuracy), and additionally fine-tune it for 200 epochs with the same warmup and learning rate (this adds roughly 4 points of accuracy to FlashAttention for Path-X, but the model starts overfitting afterwards).”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Premisereasoning
    § Abstract

    Transformers are slow and memory-hungry on long sequences because self-attention time and memory complexity are quadratic in sequence length.

    “Transformers are slow and memory-hungry on long sequences, since the time and memory complexity of self-attention are quadratic in sequence length.”
    • Also stated in: § 1 Introduction · plain
      “since the self-attention module at their heart has time and memory complexity quadratic in sequence length.”
    Quote in the paperSubstantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Premisecitation
    § 1 Introduction

    IO-aware algorithms have been critical for memory-bound operations such as database joins, image processing, and numerical linear algebra.

    “IO-aware algorithms have been critical for similar memory-bound operations, when reading and writing data can account for a large portion of the runtime-such as database joins [71], image processing [70], numerical linear algebra [4], and more [40, 85].”
    Quote in the paperNot a substantial claim0 of 3 sources checked
    • cites [71] [71] Raghu Ramakrishnan, Johannes Gehrke, and Johannes Gehrke. Database management systems , volume 3. McGraw-Hill New York, 2003. -

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites [70] [70] Jonathan Ragan-Kelley, Connelly Barnes, Andrew Adams, Sylvain Paris, Frédo Durand, and Saman Amarasinghe. Halide: a language and compiler for optimizing parallelism, locality, and recomputation in image processing pipelines. Acm Sigplan Notices , 48(6):519-530, 2013. - source
    • cites [4] [4] L Susan Blackford, Antoine Petitet, Roldan Pozo, Karin Remington, R Clint Whaley, James Demmel, Jack Dongarra, Iain Duff, Sven Hammarling, Greg Henry, et al. An updated set of basic linear algebra subprograms (blas). ACM Transactions on Mathematical Software , 28(2):135-151, 2002. -

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

  • May combine two claims.

    Study design and conductnone given
    § 1 Introduction

    FlashAttention is implemented in CUDA to achieve fine-grained control over memory access and fuse all attention operations into one GPU kernel.

    “We implement FlashAttention in CUDA to achieve fine-grained control over memory access and fuse all the attention operations into one GPU kernel.”
    Quote in the paperSubstantial claim
    • Rests on an assumption: Common Python interfaces to deep learning such as PyTorch and Tensorflow do not allow fine-grained control of memory access.
  • May combine two claims.

    Interpretationreasoning
    § 5 Limitations and Future Directions

    Building IO-aware implementations of attention requires writing the attention algorithm in a considerably lower-level language than PyTorch, and requires significant engineering effort.

    “This requires writing the attention algorithm in a considerably lower-level language than PyTorch, and requires significant engineering effort.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Interpretationreasoning
    § 5 Limitations and Future Directions

    Implementations may also not be transferrable across GPU architectures.

    “Implementations may also not be transferrable across GPU architectures.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Interpretationnone given
    § 5 Limitations and Future Directions

    Our current approach to building IO-aware implementations of attention requires writing a new CUDA kernel for each new attention implementation.

    “Our current approach to building IO-aware implementations of attention requires writing a new CUDA kernel for each new attention implementation.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing), S4 (based). May combine two claims.

    Interpretationreasoning
    § 4.2 Better Models with Longer Sequences

    The discrepancies in performance between MIMIC-III and ECtHR may be due to subtle distribution shifts: MIMIC-III contains specialized medical text and thus may be more susceptible to a distribution shift in document length, whereas ECtHR contains general language.

    “The discrepancies may be due to subtle distribution shifts: MIMIC-III contains specialized medical text and thus may be more susceptible to a distribution shift in the document length, whereas ECtHR contains general language.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing), S4 (based). May combine two claims.

    Interpretationnone given
    § 4.3 Benchmarking Attention

    Path-256 requires longer sequences but has relatively shorter paths than Path-X, so it is easier to obtain a higher accuracy.

    “Path-256 requires longer sequences but has relatively shorter paths than Path-X, so it is easier to obtain a higher accuracy.”
    Quote in the paperNot a substantial claim
  • May combine two claims.

    Interpretationreasoning
    § B Algorithm Details

    FlashAttention implements both forward and backward passes on GPUs, reduces HBM accesses, and leads to both faster runtime and smaller memory footprint.

    “We describe the FlashAttention algorithm to implement both the forward and the backward passes on GPUs that reduces HBM accesses, leading to both faster runtime and smaller memory footprint.”
    Quote in the paperSubstantial claim
    • Rests on an assumption: Attention time and memory scale quadratically in the sequence length.
  • May combine two claims.

    Interpretationreasoning
    § E.5 Speedup On Different Hardware and Configurations

    When the head dimension increases, each block requires more memory, so smaller block sizes are needed to fit into SRAM.

    “Each block requires more memory, so we need to use smaller block sizes to fit into SRAM.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing). May combine two claims.

    Interpretationreasoning
    § D.2 Potential Extensions

    Because the attention matrix is a function of low-rank QK^T, one can repeatedly load inputs Q,K and recompute the needed block of the attention matrix, significantly reducing HBM access.

    “As a result, we can repeatedly load the inputs Q K and recompute the block of the attention matrix that we need, significantly reducing HBM access.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Study design and conductown data
    § E.6 Full Benchmarking Results

    Block Sparse, Longformer, and BigBird did not successfully run the backward pass with masking due to a bug in external libraries.

    “These methods did not successfully run the backward pass with masking due to a bug in external libraries, so we measured them without masking to be generous.”
    Quote in the paperNot a substantial claim
  • Probably not a substantial claim: may not pass S3 (load-bearing), S4 (based).

    Study design and conductnone given
    § E.6 Full Benchmarking Results

    Memory footprint does not vary between runs.

    “We only measure memory footprint once, since it does not vary between runs.”
    Quote in the paperNot a substantial claim
62 of 62
  • The paper relies on this without support.

    Common Python interfaces to deep learning such as PyTorch and Tensorflow do not allow fine-grained control of memory access.

    “However, common Python interfaces to deep learning such as PyTorch and Tensorflow do not allow fine-grained control of memory access.”
  • The paper relies on this without support.

    All gradient checkpointing implementations known to the authors trade speed for memory.

    “While gradient checkpointing has been suggested to reduce the maximum amount of memory required [66], all implementations (that we know off) have to trade speed for memory.”
  • The paper relies on this without support.

    Attention time and memory scale quadratically in the sequence length.

    “However, one of their computational bottlenecks is that their time and memory scales quadratic in the sequence length.”
  • The paper relies on this without support.

    RTX 3090 memory bandwidth is roughly 900 GB/s and A100 memory bandwidth is roughly 1.5 TB/s, and the RTX 3090's is lower.

    “since the memory bandwidth on an RTX 3090 is lower than on an A100 (roughly 900 GB/s vs. 1.5 TB/s).”
  • The paper relies on this without support.

    T4 SRAM is smaller than A100 SRAM.

    “T4 SRAM is smaller than A100, so we need to make the block sizes smaller in FlashAttention .”
  • The paper relies on this without support.

    T4 GPUs are commonly used for inference.

    “T4 GPUs are commonly used for inference, so we also report speedup on the forward pass only.”
6 of 6

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • FlashAttention uses CUDA kernels that fuse block-wise matrix multiplication with an online softmax computation, to reduce the quadratic time and memory complexity in the sequence length of vanilla self-attention.

    “For example, FlashAttention [166-167] uses CUDA kernels that fuse block-wise matrix multiplication with an online softmax computation, to reduce the quadratic time and memory complexity in the sequence length of vanilla self-attention.”

    From A Survey of Large Language Models (2026) · cites this paper as [166]

    The Introduction (p. 2) and Section 3.1 (p. 5) describe block-wise computation, incremental softmax, and fusion into a CUDA kernel. They support reduced memory use and faster execution, but not reduced quadratic computational time complexity: Algorithm 1 (p. 5) still requires O(N²d) operations. (LLM, conf=0.91)

    Experimental — accuracy not yet measured
  • The additive pre-softmax form is compatible with FlashAttention.

    “The additive pre-softmax form is compatible with FlashAttention [2,13,23] .”

    From Inference-Time Attention Steering for Vision-Language-Action Driving Models (2026) · cites this paper as [2]

    Algorithm 2 (p. 20) applies a mask to attention scores before computing softmax, supporting compatibility with that specific pre-softmax modification. Appendix B.3 (p. 19) defines the mask as setting selected entries to a masking value while leaving others unchanged; it does not establish compatibility with a general additive pre-softmax term. (LLM, conf=0.78)

    Experimental — accuracy not yet measured
  • Recent works extend context windows to 100K+ tokens.

    “Recent works extend context windows to 100K+ tokens [18], [19], [23].”

    From From Goldfish to Elephant: Long-Term Memory for Large Language Models via Selective Storage and Hierarchical Compression (2026) · cites this paper as [19]

    Section 4.2 (pp. 8–9) shows that FlashAttention extends sequence lengths, but reports 4K for GPT-2 and 64K for the block-sparse Path-256 model. The paper does not support the cited sentence’s 100K+ token figure. (LLM, conf=0.87)

    Experimental — accuracy not yet measured
  • Unlimited context remains computationally infeasible and doesn't address selective retention or consistency.

    “unlimited context remains computationally infeasible and doesn't address selective retention or consistency.”

    From From Goldfish to Elephant: Long-Term Memory for Large Language Models via Selective Storage and Hierarchical Compression (2026) · cites this paper as [19]

    The Introduction (p. 1) says longer context is difficult because self-attention has quadratic time and memory complexity, and Benchmarking Attention (p. 9) says FlashAttention's runtime still grows quadratically with sequence length. This supports a computational limit on extending context, but the paper does not address selective retention or consistency, and it does not specifically assess 'unlimited' context. (LLM, conf=0.86)

    Experimental — accuracy not yet measured
  • In LLMs, each decoding step involves generating a single token, with the transfer of weights between High Bandwidth Memory (HBM) and cache contributing to significant overhead.

    “Specifically, in LLMs, each decoding step involves generating a single token, with the transfer of weights between High Bandwidth Memory (HBM) and cache contributing to significant overhead [33, 34].”

    From SnapKV: LLM Knows What You are Looking for Before Generation (2024) · cites this paper as [33]

    Section 2.2 (p. 4) says repeated HBM accesses make standard attention slow, and Section 3.1 (p. 4) describes moving attention inputs from HBM to on-chip SRAM. These passages support memory-transfer overhead in attention, but they do not say that each LLM decoding step generates one token or that transferring model weights between HBM and cache causes that overhead. (LLM, conf=0.84)

    Experimental — accuracy not yet measured

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

  • Reported 8192-length results exceed the stated support limit

    Minor

    The text says Longformer and BigBird do not support lengths above 8092, yet Table 10 reports backward-pass runtimes for both at length 8192.

  • GPT-2 speedup exceeds the stated maximum

    Minor

    The text says Table 2 shows up to 3× speedup over HuggingFace, but the table reports 3.5× for GPT-2 small.

  • Block-sparse FlashAttention is not fastest at every sequence length

    Minor

    The claim covers all sequence lengths, but Table 17 reports a slower combined runtime for block-sparse FlashAttention than for FlashAttention at sequence length 128 (0.91 versus 0.35 ms).

3 of 3

Cites

The publisher hasn’t deposited this paper’s reference list.

Research works printed but not linked: 9

  1. [4][4] L Susan Blackford, Antoine Petitet, Roldan Pozo, Karin Remington, R Clint Whaley, James Demmel, Jack Dongarra, Iain Duff, Sven Hammarling, Greg Henry, et al. An updated set of basic linear algebra subprograms (blas). ACM Transactions on Mathematical Software , 28(2):135-151, 2002. -
  2. [26][26] Jean Feydy, Joan Glaunès, Benjamin Charlier, and Michael Bronstein. Fast geometric learning with symbolic matrices. Advances in Neural Information Processing Systems , 33, 2020. -
  3. [40][40] John Hennessy and David Patterson. Memory hierarchy design. Computer Architecture: A Quantitative Approach , pages 390-525, 2003. -
  4. [44][44] Zhe Jia and Peter Van Sandt. Dissecting the Ampere GPU architecture via microbenchmarking. GPU Technology Conference, 2021. -
  5. [55][55] Ji Lin, Yongming Rao, Jiwen Lu, and Jie Zhou. Runtime neural pruning. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems , volume 30. Curran Associates, Inc., 2017. -
  6. [59][59] Frank McSherry, Michael Isard, and Derek G Murray. Scalability! but at what COST ? In 15th Workshop on Hot Topics in Operating Systems (HotOS XV) , 2015. -
  7. [65][65] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, highperformance deep learning library. Advances in neural information processing systems , 32, 2019. -
  8. [67][67] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog , 1(8):9, 2019. -
  9. [88][88] David P Woodruff. Optimal space lower bounds for all frequency moments. In SODA , volume 4, pages 167-175. Citeseer, 2004. -

Cited by

Sorted by citations

Authors
Dao, T., Fu, D. Y., Ermon, S., Rudra, A., & Ré, C.
Venue
arXiv
Publisher
arXiv
Published
2022
Pages
16344-16359
ISSN
1049-5258 (ISSN-L)
OpenAlex
W7133227460
Cited by
1,214
References
0
Citations by year
2026: 555 · 2025: 316 · 2024: 256 · 2023: 86 · 2022: 1
FWCI
132.50
Type
conference paper
Language
en
Open access
Locations
  • neural information processing systems (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • National Science Foundation (1763315, 1563078, 1937301)
  • U.S. Department of Defense (N000141712266)
  • Accenture
  • Nvidia
  • VMware
  • National Institutes of Health (N000141712266, CCF1563078, CCF1763315)
  • National Defense Science and Engineering Graduate
  • Office of Naval Research (N000141712266, ONR-N00014, N00014-20, N00014)
  • National Institute of Biomedical Imaging and Bioengineering (U54EB020405)
Topics
  • Physical Sciences › Computer Science › Hardware and Architecture › Parallel Computing and Optimization Techniques
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
Keywords
FlashAttention, memory efficiency, transformer attention, large language models, GPU memory optimization

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Claims read under definition version 3 (extract-v3) on 2026-09-28.

Classified by jev-1.13-20260917 (gold-guideline-v0.2) on 2026-09-28.

Cited sources are checked by gpt-6-sol.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review