Star Attention: Efficient LLM Inference over Long Sequences

Shantanu Acharya, Fei Jia, Boris Ginsburg
2/12/2026

No official code found. Best implementation: NVIDIA/Star-Attention (391 stars, Apache-2.0, last commit 2025-06-25).

Abstract

Inference with Transformer-based Large Language Models (LLMs) on long sequences is both costly and slow due to the quadratic complexity of the self-attention mechanism. We introduce Star Attention, a two-phase block-sparse approximation that improves computational efficiency by sharding attention across multiple hosts while minimizing communication overhead. In the first phase, the context is processed using blockwise-local attention across hosts, in parallel. In the second phase, query and response tokens attend to all prior cached tokens through sequence-global attention. Star Attention integrates seamlessly with most Transformer-based LLMs trained with global attention, reducing memory requirements and inference time by up to 11x while preserving 97-100% of accuracy.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Efficient LLM Inference over Long Sequences

39124Shell, PythonNov 19, 20241 years agoApache-2.0
attention-mechanismlarge-language-modelsllm-inference

Cite this paper

@article{acharya2026star,
  title  = {Star Attention: Efficient LLM Inference over Long Sequences},
  author = {Shantanu Acharya and Fei Jia and Boris Ginsburg},
  year   = {2026},
  eprint = {2411.17116},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2411.17116},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.17116.svg)](https://codeofpaper.com/paper/2411.17116)

Discussion