arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.07223cs.LG
收藏

Vegas: 验证引导稀疏注意力的自推测解码

Vegas: Self-Speculative Decoding with Verification-Guided Sparse Attention

National University of Singapore(新加坡国立大学)

Yikang Yue, Yuqi Xue, Jian Huang

AI总结:

提出Vegas方法,利用验证过程自然识别关键KV缓存条目,并仅对这些条目进行稀疏注意力计算,从而提升自推测解码的吞吐量。

摘要:

长上下文大语言模型(LLM)推理已成为当今AI应用的常态。然而,其KV缓存的内存需求不断增加,严重制约了推理速度。先前的研究表明,采用稀疏注意力的自推测解码(即使用KV缓存子集草拟令牌,并针对完整KV缓存并行验证)能够以无损方式加速推理。然而,这些方法依赖独立的KV选择算法来选取用于草拟的KV条目,忽略了每个KV条目的关键性已在验证过程中固有计算。本文提出Vegas,一种验证引导稀疏注意力的自推测解码方法。Vegas将验证的副产品——关键KV缓存条目——识别出来,并在草拟后续令牌时仅对这些条目计算注意力。这不仅提高了草拟令牌的接受率,还降低了KV选择开销,从而提升了解码吞吐量。与默认vLLM相比,Vegas在解码吞吐量上实现了1.25倍至2.81倍的加速;与最先进的基于稀疏注意力的自推测解码方法相比,实现了1.15倍至1.29倍的加速。我们的代码可在https://github.com/platformxlab/vegas获取。

英文摘要:

Long-context large language model (LLM) inference has become the norm for today's AI applications. However, it is severely bottlenecked by the increasing memory demands of its KV cache. Previous works have shown that self-speculative decoding with sparse attention, where tokens are drafted using a subset of the KV cache and verified in parallel against the full KV cache, speeds up inference in a lossless manner. However, they rely on a standalone KV selection algorithm to select the KV entries used for drafting and overlook the fact that the criticality of each KV entry is inherently computed during verification. In this paper, we propose Vegas, a self-speculative decoding method with verification-guided sparse attention. Vegas identifies critical KV cache entries as a byproduct of verification and computes attention only over these entries when drafting subsequent tokens. This not only improves the draft token acceptance rate but also incurs low KV selection overhead, thereby improving decoding throughput. Vegas achieves a 1.25$\times$-2.81$\times$ speedup in decoding throughput over default vLLM and a 1.15$\times$-1.29$\times$ speedup over state-of-the-art sparse attention-based self-speculative decoding methods. Our code is available at https://github.com/platformxlab/vegas.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑