Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengths
Not on the map. Why?
Abstract (arXiv)
Sliding-window attention offers a hardware-efficient solution to the memory and throughput challenges of Large Language Models (LLMs) in long-context scenarios. Existing methods typically employ a single window length across all attention heads and input sizes. However, this uniform approach fails to capture the heterogeneous attention patterns inherent in LLMs, ignoring their distinct accuracy-latency trade-offs. To address this challenge, we propose *Mixture of Attention Spans* (MoA), which automatically tailors distinct sliding-window length configurations to different heads and layers. MoA constructs and navigates a search space of various window lengths and their scaling rules relative to input sizes. It profiles the model, evaluates potential configurations, and pinpoints the optimal length configurations for each head. MoA adapts to varying input sizes, revealing that some attention heads expand their focus to accommodate longer inputs, while other heads consistently concentrate on fixed-length local contexts. Experiments show that MoA increases the effective context length by 3.9x with the same average sliding-window length, boosting retrieval accuracy by 1.5-7.1x over the uniform-window baseline across Vicuna-{7B, 13B} and Llama3-{8B, 70B} models. Moreover, MoA narrows the performance gap with full attention, reducing the maximum relative performance drop from 9%-36% to within 5% across three long-context understanding benchmarks. MoA achieves a 1.2-1.4x GPU memory reduction, boosting decode throughput by 6.6-8.2x and 1.7-1.9x over FlashAttention2 and vLLM, with minimal performance impact. Our code is available at: https://github.com/thu-nics/MoA
Key facts. Cited by 44 papers in the map (data through 7 Oct 2026). Builds on 48 of its 68 references that are in the map. First posted on arXiv 21 Jun 2024.
Builds on
48 of 68 references.
References · 48
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
36 more
- 2020Reformer: The Efficient Transformercited by 1,658
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2022SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Modelscited by 1,338
- 2024Length-Controlled AlpacaEval: A Simple Way to Debias Automatic Evaluatorscited by 865
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 805
- 2020Efficient Transformers: A Surveycited by 784
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 567
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 487
- 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 475
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 466
- 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Timecited by 428
- 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funnelingcited by 420
- 2022DeepSpeed Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scalecited by 403
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 369
- 2023SqueezeLLM: Dense-and-Sparse Quantizationcited by 285
- 2020SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruningcited by 228
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 219
- 2024A Survey on Efficient Inference for Large Language Modelscited by 197
- 2023Efficient Large Language Models: A Surveycited by 183
- 2023ASVD: Activation-aware Singular Value Decomposition for Compressing Large Language Modelscited by 156
- 2023Focused Transformer: Contrastive Training for Context Scalingcited by 133
- 2023The geometry of hidden representations of large transformer modelscited by 108
- 2018A Flexible Framework for Multi-Objective Bayesian Optimization using Random Scalarizationscited by 98
- 2020A3: Accelerating Attention Mechanisms in Neural Networks with Approximationcited by 97
- 2024LV-Eval: A Balanced Long-Context Benchmark with 5 Length Levels Up to 256Kcited by 80
- 2024Evaluating Quantized Large Language Modelscited by 75
- 2023Dynamic Context Pruning for Efficient and Interpretable Autoregressive Transformerscited by 67
- 2021SparseBERT: Rethinking the Importance Analysis in Self-attentioncited by 46
- 2024CATS: Contextually-Aware Thresholding for Sparsity in Large Language Modelscited by 41
- 2023Beyond Size: How Gradients Shape Pruning Decisions in Large Language Modelscited by 30
- 2023Faster Causal Attention Over Large Sequences Through Sparse Flash Attentioncited by 24
- 2022Diffuser: Efficient Transformers with Multi-hop Attention Diffusion for Long Sequencescited by 12
Built on by
Citing papers per year: 2024: 8; 2025: 27; 2026: 9.
44 papers.
Sort:
By area:
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 169
- 2024SeerAttention: Learning Intrinsic Sparse Attention in Your LLMscited by 121
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 121
- 2025SpargeAttention: Accurate and Training-free Sparse Attention Accelerating Any Model Inferencecited by 113
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2024Accelerating Auto-regressive Text-to-Image Generation with Training-free Speculative Jacobi Decodingcited by 65
- 2025Training-free and Adaptive Sparse Attention for Efficient Long Video Generationcited by 65
- 2025SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Trainingcited by 63
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methodscited by 59
- 2025SLA: Beyond Sparsity in Diffusion Transformers via Fine-Tunable Sparse-Linear Attentioncited by 55
- 2024FrameFusion: Combining Similarity and Importance for Video Token Reduction on Large Vision Language Modelscited by 52
32 more
- 2024MBQ: Modality-Balanced Quantization for Large Vision-Language Modelscited by 45
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2025R2R: Efficiently Navigating Divergent Reasoning Paths with Small-Large Model Token Routingcited by 28
- 2025SeerAttention-R: Sparse Attention Adaptation for Long Reasoningcited by 28
- 2025PM-KVQ: Progressive Mixed-precision KV Cache Quantization for Long-CoT LLMscited by 19
- 2025PAROAttention: Pattern-Aware ReOrdering for Efficient Sparse and Quantized Attention in Visual Generation Modelscited by 17
- 2025Think-at-Hard: Dynamic Looped Transformers for Improved Reasoningcited by 12
- 2025VTCBench: Can Vision-Language Models Understand Long Context with Vision-Text Compression?cited by 11
- 2025Distributed LLMs and Multimodal Large Language Models: A Survey on Advances, Challenges, and Future Directionscited by 10
- 2025Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?cited by 10
- 2025ProxyAttn: Guided Sparse Attention via Representative Headscited by 9
- 2026From LLMs to LRMs: Rethinking Pruning for Reasoning-Centric Modelscited by 9
- 2025GRAPHMOE: Amplifying Cognitive Depth of Mixture-of-Experts Network via Introducing Self-Rethinking Mechanismcited by 7
- 2025Long Context Scaling: Divide and Conquer via Multi-Agent Question-driven Collaborationcited by 7
- 2025Adaptive Computation Pruning for the Forgetting Transformercited by 6
- 2025XSpecMesh: Quality-Preserving Auto-Regressive Mesh Generation Acceleration via Multi-Head Speculative Decodingcited by 5
- 2025Compact Attention: Exploiting Structured Spatio-Temporal Sparsity for Fast Video Generationcited by 5
- 2024Fibottention: Inceptive Visual Representation Learning with Diverse Attention Across Headscited by 3
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefillingcited by 3
- 2025Towards Generalized Routing: Model and Agent Orchestration for Adaptive and Efficient Inferencecited by 3
- 2025FlashOmni: A Unified Sparse Attention Engine for Diffusion Transformerscited by 2
- 2026Prefix Sliding for efficient test-time scalingcited by 2
- 2025Neural Attention Searchcited by 1
- 2025CCF: A Context Compression Framework for Efficient Long-Sequence Language Modelingcited by 1
- 2025Learning When Not to Attend Globallycited by 1
- 2026Veda: Scalable Video Diffusion via Distilled Sparse Attentioncited by 1
- 2026LoGo: Token-Level Dynamic Local-Global Attentioncited by 1
- 2026Long-Context Reasoning Through Proxy-Based Chain-of-Thought Tuningcited by 0
- 2026Characterize Then Distill: Mechanistic Reasoning in Large Output Spacescited by 0
- 2026Blast Radiuscited by 0
- 2026CRISP: Cliff-awaRe Input-adaptive Sparse Prefilling with Structural-Mass-Motivated Routingcited by 0
- 2026WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Mindscited by 0
- 2026WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Minds2 Oct 2026
- 2026CRISP: Cliff-awaRe Input-adaptive Sparse Prefilling with Structural-Mass-Motivated Routing1 Sep 2026
- 2026LoGo: Token-Level Dynamic Local-Global Attention30 Aug 2026
- 2026Prefix Sliding for efficient test-time scaling26 Aug 2026
- 2026Blast Radius7 Aug 2026
- 2026Characterize Then Distill: Mechanistic Reasoning in Large Output Spaces5 Jun 2026
- 2026Veda: Scalable Video Diffusion via Distilled Sparse Attention28 May 2026
- 2026Long-Context Reasoning Through Proxy-Based Chain-of-Thought Tuning6 Apr 2026
- 2026From LLMs to LRMs: Rethinking Pruning for Reasoning-Centric Models26 Jan 2026
- 2025Learning When Not to Attend Globally27 Dec 2025
- 2025VTCBench: Can Vision-Language Models Understand Long Context with Vision-Text Compression?17 Dec 2025
- 2025Think-at-Hard: Dynamic Looped Transformers for Improved Reasoning11 Nov 2025
32 more
- 2025Kimi Linear: An Expressive, Efficient Attention Architecture30 Oct 2025
- 2025FlashOmni: A Unified Sparse Attention Engine for Diffusion Transformers29 Sep 2025
- 2025ProxyAttn: Guided Sparse Attention via Representative Heads29 Sep 2025
- 2025SLA: Beyond Sparsity in Diffusion Transformers via Fine-Tunable Sparse-Linear Attention28 Sep 2025
- 2025CCF: A Context Compression Framework for Efficient Long-Sequence Language Modeling11 Sep 2025
- 2025Towards Generalized Routing: Model and Agent Orchestration for Adaptive and Efficient Inference9 Sep 2025
- 2025Compact Attention: Exploiting Structured Spatio-Temporal Sparsity for Fast Video Generation18 Aug 2025
- 2025XSpecMesh: Quality-Preserving Auto-Regressive Mesh Generation Acceleration via Multi-Head Speculative Decoding31 Jul 2025
- 2025Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?20 Jun 2025
- 2025PAROAttention: Pattern-Aware ReOrdering for Efficient Sparse and Quantized Attention in Visual Generation Models19 Jun 2025
- 2025SeerAttention-R: Sparse Attention Adaptation for Long Reasoning10 Jun 2025
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling30 May 2025
- 2025R2R: Efficiently Navigating Divergent Reasoning Paths with Small-Large Model Token Routing27 May 2025
- 2025Long Context Scaling: Divide and Conquer via Multi-Agent Question-driven Collaboration27 May 2025
- 2025PM-KVQ: Progressive Mixed-precision KV Cache Quantization for Long-CoT LLMs24 May 2025
- 2025SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Training16 May 2025
- 2025Adaptive Computation Pruning for the Forgetting Transformer9 Apr 2025
- 2025Cognitive Memory in Large Language Models3 Apr 2025
- 2025Distributed LLMs and Multimodal Large Language Models: A Survey on Advances, Challenges, and Future Directions20 Mar 2025
- 2025Training-free and Adaptive Sparse Attention for Efficient Long Video Generation28 Feb 2025
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inference28 Feb 2025
- 2025SpargeAttention: Accurate and Training-free Sparse Attention Accelerating Any Model Inference25 Feb 2025
- 2025Neural Attention Search18 Feb 2025
- 2025GRAPHMOE: Amplifying Cognitive Depth of Mixture-of-Experts Network via Introducing Self-Rethinking Mechanism14 Jan 2025
- 2024FrameFusion: Combining Similarity and Importance for Video Token Reduction on Large Vision Language Models30 Dec 2024
- 2024MBQ: Modality-Balanced Quantization for Large Vision-Language Models27 Dec 2024
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methods13 Dec 2024
- 2024Why Does the Effective Context Length of LLMs Fall Short?24 Oct 2024
- 2024SeerAttention: Learning Intrinsic Sparse Attention in Your LLMs17 Oct 2024
- 2024Accelerating Auto-regressive Text-to-Image Generation with Training-free Speculative Jacobi Decoding2 Oct 2024
- 2024Attention Heads of Large Language Models: A Survey5 Sep 2024
- 2024Fibottention: Inceptive Visual Representation Learning with Diverse Attention Across Heads27 Jun 2024
- 2025R2R: Efficiently Navigating Divergent Reasoning Paths with Small-Large Model Token Routingcited by 28
- 2025SeerAttention-R: Sparse Attention Adaptation for Long Reasoningcited by 28
- 2025PM-KVQ: Progressive Mixed-precision KV Cache Quantization for Long-CoT LLMscited by 19
- 2025Think-at-Hard: Dynamic Looped Transformers for Improved Reasoningcited by 12
- 2026From LLMs to LRMs: Rethinking Pruning for Reasoning-Centric Modelscited by 9
- 2025GRAPHMOE: Amplifying Cognitive Depth of Mixture-of-Experts Network via Introducing Self-Rethinking Mechanismcited by 7
- 2026Prefix Sliding for efficient test-time scalingcited by 2
- 2026Long-Context Reasoning Through Proxy-Based Chain-of-Thought Tuningcited by 0
- 2026Characterize Then Distill: Mechanistic Reasoning in Large Output Spacescited by 0
- 2026Prefix Sliding for efficient test-time scaling26 Aug 2026
- 2026Characterize Then Distill: Mechanistic Reasoning in Large Output Spaces5 Jun 2026
- 2026Long-Context Reasoning Through Proxy-Based Chain-of-Thought Tuning6 Apr 2026
- 2026From LLMs to LRMs: Rethinking Pruning for Reasoning-Centric Models26 Jan 2026
- 2025Think-at-Hard: Dynamic Looped Transformers for Improved Reasoning11 Nov 2025
- 2025SeerAttention-R: Sparse Attention Adaptation for Long Reasoning10 Jun 2025
- 2025R2R: Efficiently Navigating Divergent Reasoning Paths with Small-Large Model Token Routing27 May 2025
- 2025PM-KVQ: Progressive Mixed-precision KV Cache Quantization for Long-CoT LLMs24 May 2025
- 2025GRAPHMOE: Amplifying Cognitive Depth of Mixture-of-Experts Network via Introducing Self-Rethinking Mechanism14 Jan 2025
- 2024Accelerating Auto-regressive Text-to-Image Generation with Training-free Speculative Jacobi Decodingcited by 65
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methodscited by 59
- 2025XSpecMesh: Quality-Preserving Auto-Regressive Mesh Generation Acceleration via Multi-Head Speculative Decodingcited by 5
- 2025Neural Attention Searchcited by 1
- 2025CCF: A Context Compression Framework for Efficient Long-Sequence Language Modelingcited by 1
- 2026WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Mindscited by 0
- 2026WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Minds2 Oct 2026
- 2025CCF: A Context Compression Framework for Efficient Long-Sequence Language Modeling11 Sep 2025
- 2025XSpecMesh: Quality-Preserving Auto-Regressive Mesh Generation Acceleration via Multi-Head Speculative Decoding31 Jul 2025
- 2025Neural Attention Search18 Feb 2025
- 2024SCBench: A KV Cache-Centric Analysis of Long-Context Methods13 Dec 2024
- 2024Accelerating Auto-regressive Text-to-Image Generation with Training-free Speculative Jacobi Decoding2 Oct 2024
- 2025Training-free and Adaptive Sparse Attention for Efficient Long Video Generationcited by 65
- 2025SLA: Beyond Sparsity in Diffusion Transformers via Fine-Tunable Sparse-Linear Attentioncited by 55
- 2025FlashOmni: A Unified Sparse Attention Engine for Diffusion Transformerscited by 2
- 2026Veda: Scalable Video Diffusion via Distilled Sparse Attentioncited by 1
- 2026Veda: Scalable Video Diffusion via Distilled Sparse Attention28 May 2026
- 2025FlashOmni: A Unified Sparse Attention Engine for Diffusion Transformers29 Sep 2025
- 2025SLA: Beyond Sparsity in Diffusion Transformers via Fine-Tunable Sparse-Linear Attention28 Sep 2025
- 2025Training-free and Adaptive Sparse Attention for Efficient Long Video Generation28 Feb 2025
- 2024FrameFusion: Combining Similarity and Importance for Video Token Reduction on Large Vision Language Modelscited by 52
- 2024MBQ: Modality-Balanced Quantization for Large Vision-Language Modelscited by 45
- 2025VTCBench: Can Vision-Language Models Understand Long Context with Vision-Text Compression?cited by 11
- 2025Distributed LLMs and Multimodal Large Language Models: A Survey on Advances, Challenges, and Future Directionscited by 10
- 2025VTCBench: Can Vision-Language Models Understand Long Context with Vision-Text Compression?17 Dec 2025
- 2025Distributed LLMs and Multimodal Large Language Models: A Survey on Advances, Challenges, and Future Directions20 Mar 2025
- 2024FrameFusion: Combining Similarity and Importance for Video Token Reduction on Large Vision Language Models30 Dec 2024
- 2024MBQ: Modality-Balanced Quantization for Large Vision-Language Models27 Dec 2024
- 2024SeerAttention: Learning Intrinsic Sparse Attention in Your LLMscited by 121
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 169
- 2025FlexPrefill: A Context-Aware Sparse Attention Mechanism for Efficient Long-Sequence Inferencecited by 121
- 2025SpargeAttention: Accurate and Training-free Sparse Attention Accelerating Any Model Inferencecited by 113
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2025SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Trainingcited by 63
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2025PAROAttention: Pattern-Aware ReOrdering for Efficient Sparse and Quantized Attention in Visual Generation Modelscited by 17
- 2025Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?cited by 10
- 2025ProxyAttn: Guided Sparse Attention via Representative Headscited by 9
- 2025Adaptive Computation Pruning for the Forgetting Transformercited by 6
- 2025Compact Attention: Exploiting Structured Spatio-Temporal Sparsity for Fast Video Generationcited by 5
12 most cited of 17 All 17 (JSON)
- 2026CRISP: Cliff-awaRe Input-adaptive Sparse Prefilling with Structural-Mass-Motivated Routing1 Sep 2026
- 2026LoGo: Token-Level Dynamic Local-Global Attention30 Aug 2026
- 2025Learning When Not to Attend Globally27 Dec 2025
- 2025Kimi Linear: An Expressive, Efficient Attention Architecture30 Oct 2025
- 2025ProxyAttn: Guided Sparse Attention via Representative Heads29 Sep 2025
- 2025Compact Attention: Exploiting Structured Spatio-Temporal Sparsity for Fast Video Generation18 Aug 2025
- 2025Cache Me If You Can: How Many KVs Do You Need for Effective Long-Context LMs?20 Jun 2025
- 2025PAROAttention: Pattern-Aware ReOrdering for Efficient Sparse and Quantized Attention in Visual Generation Models19 Jun 2025
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling30 May 2025
- 2025SageAttention3: Microscaling FP4 Attention for Inference and An Exploration of 8-Bit Training16 May 2025
- 2025Adaptive Computation Pruning for the Forgetting Transformer9 Apr 2025
- 2025Cognitive Memory in Large Language Models3 Apr 2025
12 newest of 17 All 17 (JSON)