跳到正文
arXiv (AI + Vision + Imaging)· Nurlan Nazaraliyev, Elaheh Sadredini, Nael Abu-Ghazaleh·· 1 天前AI 评分38

DisSparse:面向长上下文LLM服务的流水线Top-$p$稀疏注意力

DisSparse: Pipelined Top-$p$ Sparse Attention for Long-Context LLM Serving

AI 导读

DisSparse将Top-$p$稀疏注意力端到端集成进vLLM,通过将块选择与调度器关键路径解耦、用双流流水线把选择延迟隐藏在层计算之后,并引入单遍直方图Top-$p$ kernel。

正文 · 原文

arXiv:2611.28522v1 Announce Type: new Abstract: Long-context LLM inference is bottlenecked by the memory demands of the key-value (KV) cache, whose size scales linearly with context length. Dynamic sparse attention reduces this bottleneck by fetching and attending only to a critical subset of tokens. The dominant primitive in dynamic sparse attention research and deployment is fixed-budget top-$k$ selection, which is favored because its deterministic block count aligns with the static memory allocation that systems like vLLM rely on. Top-$k$ uses a fixed budget regardless of how attention mass is distributed across heads, layers, and decode steps, leading to either wasted bandwidth on heads with peaky attention or dropped context on heads with diffuse attention. Top-$p$ (nucleus) selection adapts naturally to this variation but has seen limited adoption in production serving systems due to two system-level challenges: variable block counts that break deterministic block allocation and computationally expensive selection kernels that exceed the cost of attention itself. We present DisSparse, a serving system that integrates top-$p$ sparse attention into vLLM end-to-end. DisSparse decouples block selection from the scheduler's critical path, hides selection latency behind layer computation via a two-stream pipeline, and introduces a single-pass histogram-based top-$p$ kernel. We further observe intra-block sparsity, the inflation of selection budgets caused by mixing high- and low-importance tokens within fixed-size KV cache blocks, and address it with a token relocation kernel guided by accumulated prefill attention scores. Across long- and medium-context benchmarks on multiple models, DisSparse achieves 1.17x to 1.80x speedup in sparsity analysis (block selection) over state-of-the-art top-$p$ methods with negligible accuracy loss and supports up to 8x larger maximum batch sizes than dense vLLM under the same memory budget.

来源:arXiv (AI + Vision + Imaging) · arxiv.org