Tactic: Adaptive Sparse Attention with Clustering and Distribution Fitting for Long-Context LLMs

Kan Zhu, Tian Tang, Qinyu Xu, Yile Gu, Zhichen Zeng +5 more
2/17/2025
cs.LGcs.AIcs.CL
transformer-attention

No confident code implementation found for this paper.

Abstract

Long-context models are essential for many applications but face inefficiencies in loading large KV caches during decoding. Prior methods enforce fixed token budgets for sparse attention, assuming a set number of tokens can approximate full attention.

Show full abstract

However, these methods overlook variations in the importance of attention across heads, layers, and contexts. To address these limitations, we propose Tactic, a sparsity-adaptive and calibration-free sparse attention mechanism that dynamically selects tokens based on their cumulative attention scores rather than a fixed token budget. By setting a target fraction of total attention scores, Tactic ensures that token selection naturally adapts to variations in attention sparsity. To efficiently approximate this selection, Tactic leverages clustering-based sorting and distribution fitting, allowing it to accurately estimate token importance with minimal computational overhead. We show that Tactic outperforms existing sparse attention algorithms, achieving superior accuracy and up to 7.29x decode attention speedup. This improvement translates to an overall 1.58x end-to-end inference speedup, making Tactic a practical and effective solution for long-context LLM inference in accuracy-sensitive applications.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhu2025tactic,
  title  = {Tactic: Adaptive Sparse Attention with Clustering and Distribution Fitting for Long-Context LLMs},
  author = {Kan Zhu and Tian Tang and Qinyu Xu and Yile Gu and Zhichen Zeng and Rohan Kadekodi and Liangyu Zhao and Ang Li and Arvind Krishnamurthy and Baris Kasikci},
  year   = {2025},
  eprint = {2502.12216},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.12216v1}
}

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/2502.12216.svg)](https://codeofpaper.com/paper/2502.12216)

Discussion