Twindex: Index Cache Offloading with Coarse-to-Fine Selection for Long-Context Sparse-Attention Serving
Yuxuan Xia, Jiakun Fan, Han Meng, Hao Mark Chen, Shenji Wan, Dongsheng Yang
Abstract
In long-context decoding, GPU memory (HBM) caps how many requests a GPU decodes at once. Sparse-attention models such as Qwen3.8-Flash-Next, DeepSeek V4.1-Flash and GLM-5.2 add an indexer: at every step it scores all past index entries with its own indexer cache, and attention reads the main KV of only the top-k entries. We find that once serving systems move the main KV to host memory, the indexer cache becomes the HBM bottleneck, at 63% of per-request HBM on Qwen and 75% on V4.1 at 1M tokens. Therefore, we introduce Twindex, which keeps only a compact copy of the indexer cache in HBM and the full indexer cache in host memory. At each step, the copy selects a larger candidate set, and the model's own indexer picks the top-k from the original rows of the candidates in host memory. The copy combines the shared component with the compressed residuals, both learned once offline. Twindex changes no model weights and runs inside CUDA graphs. At 1M tokens on modern GPUs, Twindex fits 1.78×, 1.62× and 3.03× as many requests as KV offloading alone on Qwen, V4.1 and GLM-5.2, and reaches 1.44×, 1.25× and 2.54× decode throughput when host memory does not limit the batch. Every request keeps its own index, and Qwen and GLM requests share prefix main KV in host memory. In our evaluations, mean benchmark scores are at most 3.1% below the baseline's.
Create a lesson
Related papers
XM-Sparse: High-Throughput Sparse-Attention LLM Serving over Scale-up Memory Pools
Shared title terminology · Yijun Sun, Xudong Liao, Zhuobin Huang et al.
AscMLA: Unlocking FP4 Efficiency for Long-Context MLA Decoding through Asymmetric Scaling
Shared title terminology · Zechun Zhou, Zhiyong Zheng, Xiaomin Zhang et al.
Contexture: Runtime Context Eviction for High-Throughput Agent Serving
Shared title terminology · Colin Hong, Bryan Shan, Wei Siong Pang et al.
TideCache: Efficient Hybrid LLM Serving with Transparent Cache Management and Layer-Wise Streaming
Shared title terminology · Jinbin Luo, Xiaozhe Yao, Shang Yang et al.
DexAttention: Distributed Sparse Attention through Rapid Online Planning and Persistent GPU Execution
Shared title terminology · Sirui Chen, Xuehai Qian
TileCache: Serving Multi-Round Diffusion Image Editing with Compressed Activation Caches
Shared title terminology · Yuyang Tian, Desen Sun, Shuncheng Jie et al.