LeanSparse: Memory-Efficient Serving for Native Sparse-Attention LLMs
Zaifeng Pan, Chris Wu, Xinwei Qiang, Zhengding Hu, Zhongkai Yu, Yufei Ding
Key points
From the paper's conclusion- We implement LeanSparse in SGLang and evaluate it on DeepSeek-V4-Flash.
Abstract
Sparse attention limits the history read by each query, but serving long contexts still requires substantial GPU memory. Existing KV offloading systems retain the full history of indexer keys on GPU, limiting decode concurrency. Prefill's temporary memory demand can further delay admission even when enough memory remains for the same request's subsequent decode. We present LeanSparse, a serving system that reduces both decode's persistent memory use and prefill's temporary memory demand. Our design exploits two observations: prefill consumes historical data one layer at a time, and decode can identify promising candidates before comparing their original indexer scores. During prefill, LeanSparse streams layer histories through two reusable GPU buffers, overlapping next-layer loading with ongoing model computation. During decode, coarse-to-fine indexing searches compact representations and retrieves original indexer keys only for candidate refinement. Separate indexer key and KV caches reuse data across generation steps. We implement LeanSparse in SGLang and evaluate it on DeepSeek-V4-Flash. At 950K context length, LeanSparse supports 2.95$\times$ as many concurrent requests and achieves 2.14$\times$ decode throughput over HiSparse. On multi-turn Open-SWE traces, it reduces median time to first token from 21.6 to 0.6s and median session completion time by 17.7% relative to ECHO.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- XM-Sparse: High-Throughput Sparse-Attention LLM Serving over Scale-up Memory PoolsarXiv · 2026
- IndexerStage: Staging Indexer-K across Memory Tiers for Sparse-Attention LLM ServingarXiv · 2026
- DisSparse: Pipelined Top-$p$ Sparse Attention for Long-Context LLM ServingarXiv · 2026
- Twindex: Index Cache Offloading with Coarse-to-Fine Selection for Long-Context Sparse-Attention ServingarXiv · 2026
- AttentionIndex: Accelerating Learned Sparse Attention with a Causal Inverted-File IndexarXiv · 2026
- Joint Subspace Sparse Attention for Efficient Long-Context DecodingarXiv · 2026