arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.05191cs.LGcs.AI
收藏

Double-P: 分层Top-P稀疏注意力机制用于长上下文LLM

Double-P: Hierarchical Top-P Sparse Attention for Long-Context LLMs

ucsd(加州大学圣迭戈分校);umich(密歇根大学);qualcomm(高通AI研究);nvidia

Wentao Ni, Kangqi Zhang, Zhongming Yu, Oren Nelson, Mingu Lee, Hong Cai, Fatih Porikli, Jongryool Kim, Zhijian Liu, Jishen Zhao

AI总结:

Double-P通过分层Top-P稀疏注意力机制,优化长上下文LLM的解码效率,实现更高的准确性和更快的处理速度。

摘要:

随着长上下文推理成为大型语言模型(LLM)的核心,随着键值缓存的增长,注意力成为主要的解码瓶颈,推动了稀疏注意力的可扩展解码。固定预算Top-k稀疏注意力无法适应不同头和层之间的异构注意力分布,而Top-p稀疏注意力直接保留注意力质量并提供更强的准确性保证。然而,现有Top-p方法未能联合优化Top-p准确性、选择开销和稀疏注意力成本,这限制了其整体效率。我们提出了Double-P,一种分层稀疏注意力框架,优化了所有三个阶段。Double-P首先在集群层面使用大小加权质心进行粗粒度Top-p估计,然后通过第二阶段的Top-p进行自适应计算优化,仅在需要时分配令牌级注意力。在长上下文基准测试中,Double-P始终实现接近零的准确性下降,将注意力计算开销减少高达1.8倍,并在最先进的固定预算稀疏注意力方法上实现高达1.3倍的端到端解码加速。

英文摘要:

As long-context inference becomes central to large language models (LLMs), attention over growing key-value caches emerges as a dominant decoding bottleneck, motivating sparse attention for scalable inference. Fixed-budget top-k sparse attention cannot adapt to heterogeneous attention distributions across heads and layers, whereas top-p sparse attention directly preserves attention mass and provides stronger accuracy guarantees. Existing top-p methods, however, fail to jointly optimize top-p accuracy, selection overhead, and sparse attention cost, which limits their overall efficiency. We present Double-P, a hierarchical sparse attention framework that optimizes all three stages. Double-P first performs coarse-grained top-p estimation at the cluster level using size-weighted centroids, then adaptively refines computation through a second top-p stage that allocates token-level attention only when needed. Across long-context benchmarks, Double-P consistently achieves near-zero accuracy drop, reducing attention computation overhead by up to 1.8x and delivers up to 1.3x end-to-end decoding speedup over state-of-the-art fixed-budget sparse attention methods.

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

↑