Faster Causal Attention Over Large Sequences Through Sparse Flash Attention
Not on the map. Why?
Abstract (arXiv)
Transformer-based language models have found many diverse applications requiring them to process sequences of increasing length. For these applications, the causal self-attention -- which is the only component scaling quadratically w.r.t. the sequence length -- becomes a central concern. While many works have proposed schemes to sparsify the attention patterns and reduce the computational overhead of self-attention, those are often limited by implementations concerns and end up imposing a simple and static structure over the attention matrix. Conversely, implementing more dynamic sparse attentions often results in runtimes significantly slower than computing the full attention using the Flash implementation from Dao et al. (2022). We extend FlashAttention to accommodate a large class of attention sparsity patterns that, in particular, encompass key/query dropping and hashing-based attention. This leads to implementations with no computational complexity overhead and a multi-fold runtime speedup on top of FlashAttention. Even with relatively low degrees of sparsity, our method improves visibly upon FlashAttention as the sequence length increases. Without sacrificing perplexity, we increase the training speed of a transformer language model by 2.0× and 3.3× for sequences of respectively 8k and 16k tokens.
Key facts. Cited by 24 papers in the map (data through 7 Oct 2026). Builds on 28 of its 36 references that are in the map. First posted on arXiv 1 Jun 2023.
Builds on
28 of 36 references.
References · 28
- 2017Attention Is All You Needcited by 59,932
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2020Rethinking Attention with Performerscited by 1,584
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2021Ethical and social risks of harm from Language Modelscited by 957
16 more
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
- 2019Are Sixteen Heads Really Better than One?cited by 803
- 2020Efficient Transformers: A Surveycited by 784
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2021Random Feature Attentioncited by 350
- 2020SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruningcited by 228
- 2022cosFormer: Rethinking Softmax in Attentioncited by 212
- 2020Synthesizer: Rethinking Self-Attention in Transformer Modelscited by 204
- 2022Structured Pruning Learns Compact and Accurate Modelscited by 167
- 2021Learned Token Pruning for Transformerscited by 138
- 2015Practical and Optimal LSH for Angular Distancecited by 105
- 2021Differentiable Subset Pruning of Transformer Headscited by 46
- 2020Fixed Encoder Self-Attention Patterns in Transformer-Based Machine Translationcited by 42
- 2022Linear Complexity Randomized Self-attention Mechanismcited by 31
- 2020Scheduled DropHead: A Regularization Method for Transformer Modelscited by 28
- 2020A Mixture of h-1 Heads is Better than h Headscited by 22
Built on by
Citing papers per year: 2023: 4; 2024: 11; 2025: 7; 2026: 2.
24 papers.
Sort:
By area:
- 2024A Survey on Efficient Inference for Large Language Modelscited by 197
- 2023Efficient Large Language Models: A Surveycited by 183
- 2024LoongServe: Efficiently Serving Long-Context Large Language Models with Elastic Sequence Parallelismcited by 110
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systemscited by 101
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 51
- 2024Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengthscited by 44
- 2024SampleAttention: Near-Lossless Acceleration of Long Context LLM Inference with Adaptive Structured Sparse Attentioncited by 39
- 2024Large Language Model Inference Acceleration: A Comprehensive Hardware Perspectivecited by 36
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2023CoTFormer: A Chain-of-Thought Driven Architecture with Budget-Adaptive Computation Cost at Inferencecited by 27
- 2024Analysing The Impact of Sequence Composition on Language Model Pre-Trainingcited by 22
12 more
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turnscited by 20
- 2024FlashMask: Efficient and Rich Mask Extension of FlashAttentioncited by 18
- 2025MoQAE: Mixed-Precision Quantization for Long-Context LLM Inference via Mixture of Quantization-Aware Expertscited by 12
- 2024HDT: Hierarchical Document Transformercited by 6
- 2025Compression Barriers for Autoregressive Transformerscited by 5
- 2025Spark Transformer: Reactivating Sparsity in FFN and Attentioncited by 5
- 2025Overcoming Long-Context Limitations of State-Space Models via Context-Dependent Sparse Attentioncited by 5
- 2024Model Agnostic Hybrid Sharding For Heterogeneous Distributed Inferencecited by 2
- 2025Longer Attention Span: Increasing Transformer Context Length with Sparse Graph Processing Techniquescited by 1
- 2024TalkMosaic: Interactive PhotoMosaic with Multi-modal LLM Q&A Interactionscited by 0
- 2026Mixtures of Subspaces for Bandwidth Efficient Context Parallel Trainingcited by 0
- 2026BF1: A Causal Dyadic Sparse-Attention Retrofit for Efficient Long-Context Transformerscited by 0
- 2026BF1: A Causal Dyadic Sparse-Attention Retrofit for Efficient Long-Context Transformers19 Aug 2026
- 2026Mixtures of Subspaces for Bandwidth Efficient Context Parallel Training15 Jun 2026
- 2025Overcoming Long-Context Limitations of State-Space Models via Context-Dependent Sparse Attention1 Jul 2025
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turns16 Jun 2025
- 2025MoQAE: Mixed-Precision Quantization for Long-Context LLM Inference via Mixture of Quantization-Aware Experts9 Jun 2025
- 2025Spark Transformer: Reactivating Sparsity in FFN and Attention7 Jun 2025
- 2025Cognitive Memory in Large Language Models3 Apr 2025
- 2025Compression Barriers for Autoregressive Transformers21 Feb 2025
- 2025Longer Attention Span: Increasing Transformer Context Length with Sparse Graph Processing Techniques31 Jan 2025
- 2024Large Language Model Inference Acceleration: A Comprehensive Hardware Perspective6 Oct 2024
- 2024FlashMask: Efficient and Rich Mask Extension of FlashAttention2 Oct 2024
- 2024TalkMosaic: Interactive PhotoMosaic with Multi-modal LLM Q&A Interactions20 Sep 2024
12 more
- 2024Model Agnostic Hybrid Sharding For Heterogeneous Distributed Inference29 Jul 2024
- 2024HDT: Hierarchical Document Transformer11 Jul 2024
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformers24 Jun 2024
- 2024Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengths21 Jun 2024
- 2024SampleAttention: Near-Lossless Acceleration of Long Context LLM Inference with Adaptive Structured Sparse Attention17 Jun 2024
- 2024A Survey on Efficient Inference for Large Language Models22 Apr 2024
- 2024LoongServe: Efficiently Serving Long-Context Large Language Models with Elastic Sequence Parallelism15 Apr 2024
- 2024Analysing The Impact of Sequence Composition on Language Model Pre-Training21 Feb 2024
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systems23 Dec 2023
- 2023Efficient Large Language Models: A Survey6 Dec 2023
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Survey21 Nov 2023
- 2023CoTFormer: A Chain-of-Thought Driven Architecture with Budget-Adaptive Computation Cost at Inference16 Oct 2023
- 2024A Survey on Efficient Inference for Large Language Modelscited by 197
- 2024LoongServe: Efficiently Serving Long-Context Large Language Models with Elastic Sequence Parallelismcited by 110
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systemscited by 101
- 2024Large Language Model Inference Acceleration: A Comprehensive Hardware Perspectivecited by 36
- 2025Compression Barriers for Autoregressive Transformerscited by 5
- 2025Compression Barriers for Autoregressive Transformers21 Feb 2025
- 2024Large Language Model Inference Acceleration: A Comprehensive Hardware Perspective6 Oct 2024
- 2024A Survey on Efficient Inference for Large Language Models22 Apr 2024
- 2024LoongServe: Efficiently Serving Long-Context Large Language Models with Elastic Sequence Parallelism15 Apr 2024
- 2023Towards Efficient Generative Large Language Model Serving: A Survey from Algorithms to Systems23 Dec 2023
- 2023Efficient Large Language Models: A Surveycited by 183
- 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 71
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 51
- 2024Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengthscited by 44
- 2024SampleAttention: Near-Lossless Acceleration of Long Context LLM Inference with Adaptive Structured Sparse Attentioncited by 39
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2024Analysing The Impact of Sequence Composition on Language Model Pre-Trainingcited by 22
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turnscited by 20
- 2024FlashMask: Efficient and Rich Mask Extension of FlashAttentioncited by 18
- 2024HDT: Hierarchical Document Transformercited by 6
- 2025Spark Transformer: Reactivating Sparsity in FFN and Attentioncited by 5
- 2025Overcoming Long-Context Limitations of State-Space Models via Context-Dependent Sparse Attentioncited by 5
12 most cited of 16 All 16 (JSON)
- 2026BF1: A Causal Dyadic Sparse-Attention Retrofit for Efficient Long-Context Transformers19 Aug 2026
- 2026Mixtures of Subspaces for Bandwidth Efficient Context Parallel Training15 Jun 2026
- 2025Overcoming Long-Context Limitations of State-Space Models via Context-Dependent Sparse Attention1 Jul 2025
- 2025StoryBench: A Dynamic Benchmark for Evaluating Long-Term Memory with Multi Turns16 Jun 2025
- 2025Spark Transformer: Reactivating Sparsity in FFN and Attention7 Jun 2025
- 2025Cognitive Memory in Large Language Models3 Apr 2025
- 2025Longer Attention Span: Increasing Transformer Context Length with Sparse Graph Processing Techniques31 Jan 2025
- 2024FlashMask: Efficient and Rich Mask Extension of FlashAttention2 Oct 2024
- 2024Model Agnostic Hybrid Sharding For Heterogeneous Distributed Inference29 Jul 2024
- 2024HDT: Hierarchical Document Transformer11 Jul 2024
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformers24 Jun 2024
- 2024Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengths21 Jun 2024
12 newest of 16 All 16 (JSON)