AttnEx: Sparse-Attention Indexing with Per-Layer Head Allocation and Streaming Top-k
Abstract
Trainable sparse attention reduces long-context inference cost by using a multi-head indexer to select a fixed number of keys k per query in each layer. The indexer still scores every preceding key with a uniform head count, making long prefill compute-intensive, and its score matrix competes with the key-value (KV) cache for GPU memory. Existing methods reduce scoring through cross-layer reuse or coarse block filtering, but either can miss relevant keys. Attention Express (AttnEx) sizes each layer's indexer by its attention coverage, the share of attention probability mass captured by the selected keys. AttnEx also fuses key scoring with exact top-k selection and writes only surviving candidates. With about 15 heads per layer instead of 64 in DeepSeek-V3.2 and 32 in GLM-5.1, AttnEx keeps quality comparable to the original indexers on eight 128K-token benchmarks. In vLLM on eight H200 GPUs, AttnEx speeds up time to first token (TTFT) by up to 1.52x within the native context windows and 1.76x at 1M tokens under the default 512 MB score-matrix budget.
Create a lesson
Metadata
- Categories
- cs.DC, cs.CL, cs.LG
- Comments
- 15 pages, 14 figures, 5 tables
Related papers
IndexServe: Disaggregating the Indexer as a Service for Efficient Sparse-Attention LLM Serving
Shared title terminologycs.DCYuzheng Wang, Yilong Luo, Junhao Hu et al.
IndexerStage: Staging Indexer-K across Memory Tiers for Sparse-Attention LLM Serving
Shared title terminologycs.DCXin Zhang, Weifeng Zhang, Xianyan Xie et al.
Deterministic Gossiping and Sparse Reporting in Directed Radio Networks
Shared title terminologycs.DCQin Xin
Information-Theoretic Communication Lower Bounds for Sparse Matrix Multiplication
Shared title terminologycs.DCGrace Dinh, Vivienne Goyal, Raye Kimmerer et al.
BudgetGT: Distributed Full-Graph Transformer on Large Graphs with Budgeted Attention and Memory
Shared title terminologycs.DCChu Zhao, Yuan Fang, Yuhai Zhao et al.
Parallel Memory Management in Goose, C++, and Rust: An Experimental Study of Allocation, Reclamation, and Scaling
Shared title terminologycs.DCRafał Frączek