Self-Selected Attention Span for Accelerating Large Language Model Inference
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) can solve challenging tasks. However, their inference computation on modern GPUs is highly inefficient due to the increasing number of tokens they must attend to as they generate new ones. To address this inefficiency, we capitalize on LLMs' problem-solving capabilities to optimize their own inference-time efficiency. We demonstrate with two specific tasks: (a) evaluating complex arithmetic expressions and (b) summarizing news articles. For both tasks, we create custom datasets to fine-tune an LLM. The goal of fine-tuning is twofold: first, to make the LLM learn to solve the evaluation or summarization task, and second, to train it to identify the minimal attention spans required for each step of the task. As a result, the fine-tuned model is able to convert these self-identified minimal attention spans into sparse attention masks on-the-fly during inference. We develop a custom CUDA kernel to take advantage of the reduced context to attend to. We demonstrate that using this custom CUDA kernel improves the throughput of LLM inference by 28%. Our work presents an end-to-end demonstration showing that training LLMs to self-select their attention spans speeds up autoregressive inference in solving real-world tasks.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 16 of its 38 references that are in the map. First posted on arXiv 14 Apr 2024.
Builds on
16 of 38 references.
References · 16
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2015Learning both Weights and Connections for Efficient Neural Networkscited by 1,998
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2015Teaching Machines to Read and Comprehendcited by 1,039
- 2021DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsificationcited by 849
- 2020Sparse Sinkhorn Attentioncited by 250
- 2020SpAtten: Efficient Sparse Attention Architecture with Cascade Token and Head Pruningcited by 228
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
4 more
- 2016Decoupled Neural Interfaces using Synthetic Gradientscited by 135
- 2015Scalable Gradient-Based Tuning of Continuous Regularization Hyperparameterscited by 71
- 2020DHP: Differentiable Meta Pruning via HyperNetworkscited by 57
- 2017Understanding Synthetic Gradients and Decoupled Neural Interfacescited by 35
Built on by
Citing papers per year: 2024: 1; 2025: 1; 2026: 2.
4 papers.
- 2025A Survey of Context Engineering for Large Language Modelscited by 120
- 2024Artificial Intelligence as the New Hacker: Developing Agents for Offensive Securitycited by 4
- 2026Language Models Can Control Their Own Attentioncited by 1
- 2026On-Demand Attention: Language Models Know When to Recallcited by 0
- 2026On-Demand Attention: Language Models Know When to Recall17 Sep 2026
- 2026Language Models Can Control Their Own Attention2 Sep 2026
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2024Artificial Intelligence as the New Hacker: Developing Agents for Offensive Security9 May 2024