Star Attention: Efficient LLM Inference over Long Sequences

Shantanu Acharya, Fei Jia, Boris Ginsburg
Proceedings of the 42nd International Conference on Machine Learning, PMLR 267:356-371, 2025.

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.

Cite this Paper


BibTeX
@InProceedings{pmlr-v267-acharya25a, title = {Star Attention: Efficient {LLM} Inference over Long Sequences}, author = {Acharya, Shantanu and Jia, Fei and Ginsburg, Boris}, booktitle = {Proceedings of the 42nd International Conference on Machine Learning}, pages = {356--371}, year = {2025}, editor = {Singh, Aarti and Fazel, Maryam and Hsu, Daniel and Lacoste-Julien, Simon and Berkenkamp, Felix and Maharaj, Tegan and Wagstaff, Kiri and Zhu, Jerry}, volume = {267}, series = {Proceedings of Machine Learning Research}, month = {13--19 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v267/main/assets/acharya25a/acharya25a.pdf}, url = {https://proceedings.mlr.press/v267/acharya25a.html}, 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.} }
Endnote
%0 Conference Paper %T Star Attention: Efficient LLM Inference over Long Sequences %A Shantanu Acharya %A Fei Jia %A Boris Ginsburg %B Proceedings of the 42nd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2025 %E Aarti Singh %E Maryam Fazel %E Daniel Hsu %E Simon Lacoste-Julien %E Felix Berkenkamp %E Tegan Maharaj %E Kiri Wagstaff %E Jerry Zhu %F pmlr-v267-acharya25a %I PMLR %P 356--371 %U https://proceedings.mlr.press/v267/acharya25a.html %V 267 %X 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.
APA
Acharya, S., Jia, F. & Ginsburg, B.. (2025). Star Attention: Efficient LLM Inference over Long Sequences. Proceedings of the 42nd International Conference on Machine Learning, in Proceedings of Machine Learning Research 267:356-371 Available from https://proceedings.mlr.press/v267/acharya25a.html.

Related Material