arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.16391cs.LGcs.AIcs.DC
收藏

Kascade:一种适用于长上下文LLM推理的实用稀疏注意力方法

Kascade: A Practical Sparse Attention Method for Long-Context LLM Inference

Dhruv Deshmukh, Saurabh Goyal, Nipun Kwatra, Ramachandran Ramjee

AI总结:

Kascade是一种无需训练的稀疏注意力方法,通过锚定层计算Top-k索引并重用,实现长上下文LLM推理中的高效注意力处理。

摘要:

注意力是长上下文LLM推理中主要的延迟来源,这种工作负载日益流行,尤其是在推理模型和检索增强生成(RAG)中。我们提出Kascade,一种无需训练的稀疏注意力方法,利用已知的观察结果,例如1)softmax后注意力本质上是稀疏的,以及2)高权重键的身份在相邻层之间是稳定的。Kascade在少量锚定层中计算精确的Top-k索引,然后在中间重用层中重用这些索引。锚定层通过动态规划目标算法选择,该目标在开发集上最大化跨层相似性,允许在不同模型之间轻松部署。该方法结合了高效的实现约束(例如,基于瓷砖的操作),适用于预填充和解码注意力。Kascade的Top-k选择和重用是头部感知的,我们实验表明,这一点对于高精度至关重要。Kascade在H100 GPU上相对于FlashAttention-3基线在解码注意力上实现了高达4.1倍的速度提升,在预填充注意力上实现了2.2倍的速度提升,同时在长上下文基准如LongBench和AIME-24上与密集注意力的精度接近。

英文摘要:

Attention is the dominant source of latency during long-context LLM inference, an increasingly popular workload with reasoning models and RAG. We propose Kascade, a training-free sparse attention method that leverages known observations such as 1) post-softmax attention is intrinsically sparse, and 2) the identity of high-weight keys is stable across nearby layers. Kascade computes exact Top-k indices in a small set of anchor layers, then reuses those indices in intermediate reuse layers. The anchor layers are selected algorithmically, via a dynamic-programming objective that maximizes cross-layer similarity over a development set, allowing easy deployment across models. The method incorporates efficient implementation constraints (e.g. tile-level operations), across both prefill and decode attention. The Top-k selection and reuse in Kascade is head-aware and we show in our experiments that this is critical for high accuracy. Kascade achieves up to 4.1x speedup in decode attention and 2.2x speedup in prefill attention over FlashAttention-3 baseline on H100 GPUs while closely matching dense attention accuracy on long-context benchmarks such as LongBench and AIME-24.

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

↑