Coarse Semantic Blocks for Efficient Training-Free Sparse Attention
Sosuke Kobayashi, Shoichiro Yamaguchi, Seiya Tokui
Abstract
We introduce a training-free sparse attention method that builds a prompt-specific key index to accelerate both prefill and decoding. The method clusters the keys into large semantic blocks that group tokens from noncontiguous positions. Each query position selects blocks by scoring their centroids and attends to the original keys and values within them. Queries that select the same block are processed together, so prefill stays fast even though each query chooses its own blocks. Large blocks make centroid scoring and this grouped processing cheap, so each query can attend to more tokens in the same time. Larger blocks with a larger token budget can thus be both faster and more accurate on long-context tasks than smaller blocks with a smaller budget. We evaluate two hybrid LLMs, Qwen3.5-4B and 35B-A3B, on one NVIDIA H200. Including the cost of building and using the index, whole-model wall-clock speedups over dense attention are 2.3-2.4x for prefill and 1.7-2.0x for decoding at 512K tokens, and 2.9-3.0x for prefill at 1M. The 35B-A3B model stays close to dense attention on five RULER tasks through 1M, on LongBench-v2 overall, and on MRCR through 256K. The 4B model loses accuracy mainly on multi-key retrieval, yet outperforms dense Qwen3.5-2B, whose latency is similar at 512K, on all three benchmarks.
Create a lesson
Related papers
What Is the Influence of Task Order in Continual Learning? An Empirical Study and Order-Aware Evaluation for Motion Forecasting
Zirui Li, Yunlong Lin, Haohan Yang et al.
Reciprocity Can Erase Direction:tructural Boundaries and Controlled Utility of Magnetic Graph Networks
Dawei Han, Zicheng Wang, Yaoxing Ren et al.
Deep Learning Compilers: Architecture, Optimization, and Empirical Characterization
Jinghao Wen, Ruixuan Wang, Xun Jiao
OmniST: Topology-Invariant Spatiotemporal Forecasting with Guaranteed-Coverage Uncertainty at Unseen Sensor Locations
Praveg Vashishtha
LIRA: A More Interpretable Dynamic Loss-Informed Rank Allocation for Low-Rank Adaptation
Sihao Wang, Bozheng Li, Xuemiao Xu et al.
LENS: Reliability-Aware Stock Prediction via LLM-Extracted Priors and News-Driven Semantic Graphs
Hao Zhou, Tiejun Ma, Luis Felipe Costa Sperb