The deployment of Large Language Models (LLMs) faces a critical bottleneck when handling lengthy inputs: the prohibitive memory footprint of the Key Value (KV) cache. To address this bottleneck, the token pruning paradigm leverages attention sparsity to selectively retain a small, critical subset of tokens. However, existing approaches fall short, with static methods risking irreversible information loss and dynamic strategies employing heuristics that insufficiently capture the query-dependent nature of token importance. We propose FASA, a novel framework that achieves query-aware token eviction by dynamically predicting token importance. FASA stems from a novel insight into RoPE: the discovery of functional sparsity at the frequency-chunk (FC) level. Our key finding is that a small, identifiable subset of "dominant" FCs consistently exhibits high contextual agreement with the full attention head. This provides a robust and computationally free proxy for identifying salient tokens. Building on this insight, FASA first identifies a critical set of tokens using dominant FCs, and then performs focused attention computation solely on this pruned subset. Across a spectrum of long-context tasks, from sequence modeling to complex CoT reasoning, FASA consistently outperforms all token-eviction baselines and achieves near-oracle accuracy, demonstrating remarkable robustness even under constraint budgets. Notably, on LongBench-V1, FASA reaches nearly 100\% of full-KV performance when only keeping 256 tokens, and achieves 2.56$\times$ speedup using just 18.9\% of the cache on AIME24.


翻译:大型语言模型(LLM)在处理长序列输入时面临一个关键瓶颈:键值(KV)缓存的存储开销过高。为应对这一瓶颈,令牌剪枝范式利用注意力稀疏性,选择性地保留一小部分关键令牌。然而,现有方法存在不足:静态方法可能造成不可逆的信息损失,而动态策略采用的启发式方法难以充分捕捉令牌重要性对查询的依赖性。本文提出FASA,一种通过动态预测令牌重要性实现查询感知令牌淘汰的新框架。FASA源于对RoPE的新颖洞察:在频率块(FC)层面发现了功能性稀疏性。我们的核心发现是,一小部分可识别的“主导”FC始终与完整注意力头保持高度的上下文一致性,这为识别重要令牌提供了稳健且零计算成本的代理指标。基于此发现,FASA首先利用主导FC识别关键令牌集合,随后仅在此剪枝子集上进行聚焦注意力计算。在一系列长上下文任务(从序列建模到复杂思维链推理)中,FASA始终优于所有令牌淘汰基线方法,并达到接近理论最优的准确率,即使在受限缓存预算下也展现出卓越的稳健性。值得注意的是,在LongBench-V1基准测试中,FASA仅保留256个令牌即可达到接近100%的全KV缓存性能,并在AIME24数据集上仅使用18.9%的缓存即实现2.56倍的加速。

0
下载
关闭预览

相关内容

大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
【ICLR2025】大型语言模型的动态低秩稀疏适应
专知会员服务
14+阅读 · 2025年2月21日
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
赛尔笔记 | Attention!注意力机制可解释吗?
哈工大SCIR
23+阅读 · 2019年9月27日
用Attention玩转CV,一文总览自注意力语义分割进展
基础 | 基于注意力机制的seq2seq网络
黑龙江大学自然语言处理实验室
16+阅读 · 2018年3月7日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Arxiv
0+阅读 · 1月16日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员