Extended reasoning in large language models (LLMs) creates severe KV cache memory bottlenecks. Leading KV cache compression methods estimate KV importance using attention scores from recent post-RoPE queries. However, queries rotate with position during RoPE, making representative queries very few, leading to poor top-key selection and unstable reasoning. To avoid this issue, we turn to the pre-RoPE space, where we observe that Q and K vectors are highly concentrated around fixed non-zero centers and remain stable across positions -- Q/K concentration. We show that this concentration causes queries to preferentially attend to keys at specific distances (e.g., nearest keys), with the centers determining which distances are preferred via a trigonometric series. Based on this, we propose TriAttention to estimate key importance by leveraging these centers. Via the trigonometric series, we use the distance preference characterized by these centers to score keys according to their positions, and also leverage Q/K norms as an additional signal for importance estimation. On AIME25 with 32K-token generation, TriAttention matches Full Attention reasoning accuracy while achieving 2.5x higher throughput or 10.7x KV memory reduction, whereas leading baselines achieve only about half the accuracy at the same efficiency. TriAttention enables OpenClaw deployment on a single consumer GPU, where long context would otherwise cause out-of-memory with Full Attention.


翻译:摘要:在大语言模型(LLMs)中,扩展推理过程会产生严重的KV缓存内存瓶颈。当前的领先KV缓存压缩方法利用最近后RoPE查询的注意力分数来估计KV重要性。然而,在RoPE过程中,查询向量会随位置旋转,导致代表性查询极少,进而造成关键顶部选择不佳和推理不稳定。为解决此问题,我们转向前RoPE空间,观察到Q和K向量高度集中于固定的非零中心,并在不同位置上保持稳定——即Q/K集中现象。我们证明,这种集中性使得查询倾向于关注特定距离处的关键(例如最近的关键),而中心通过三角级数决定哪些距离被偏好。基于此,我们提出TriAttention,通过利用这些中心来估计关键重要性。借助三角级数,我们使用这些中心表征的距离偏好,根据关键位置对其进行评分,同时利用Q/K范数作为重要性估计的额外信号。在AIME25的32K token生成任务中,TriAttention在匹配全注意力推理精度的同时,实现了2.5倍的吞吐量提升或10.7倍的KV内存缩减,而领先基线方法在相同效率下仅能达到约一半的精度。TriAttention使得OpenClaw能够在单个消费级GPU上部署,而全注意力在长上下文场景下会导致内存不足。

0
下载
关闭预览

相关内容

【普林斯顿博士论文】大型模型的高效推理
专知会员服务
23+阅读 · 2025年8月10日
高效大语言模型推理服务综述
专知会员服务
18+阅读 · 2025年4月30日
大规模推理模型的高效推理:综述
专知会员服务
21+阅读 · 2025年4月3日
高效推理的集约化探索:大语言模型推理优化综述
专知会员服务
33+阅读 · 2025年4月1日
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
大模型的模型压缩与有效推理综述
专知会员服务
43+阅读 · 2024年7月8日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
大型语言模型的模型压缩与高效推理:综述
专知会员服务
94+阅读 · 2024年2月17日
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
注意力机制可解释吗?这篇ACL 2019论文说……
机器之心
11+阅读 · 2019年6月16日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
【优青论文】深度神经网络压缩与加速综述
计算机研究与发展
17+阅读 · 2018年9月20日
如何设计基于深度学习的图像压缩算法
论智
41+阅读 · 2018年4月26日
CNN 模型压缩与加速算法综述
机器学习研究会
16+阅读 · 2017年8月25日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Arxiv
0+阅读 · 2月20日
VIP会员
相关主题
最新内容
ICML 2026 | CFPO:用反事实策略优化提升多模态推理
专知会员服务
1+阅读 · 今天14:45
综述 | 世界动作模型:少做梦,多行动
专知会员服务
1+阅读 · 今天14:43
美以伊冲突:无人机与人工智能的运用
专知会员服务
3+阅读 · 今天14:31
《特种部队在透明战场中的生存力》最新报告
专知会员服务
2+阅读 · 今天14:11
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关VIP内容
【普林斯顿博士论文】大型模型的高效推理
专知会员服务
23+阅读 · 2025年8月10日
高效大语言模型推理服务综述
专知会员服务
18+阅读 · 2025年4月30日
大规模推理模型的高效推理:综述
专知会员服务
21+阅读 · 2025年4月3日
高效推理的集约化探索:大语言模型推理优化综述
专知会员服务
33+阅读 · 2025年4月1日
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
大模型的模型压缩与有效推理综述
专知会员服务
43+阅读 · 2024年7月8日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
大型语言模型的模型压缩与高效推理:综述
专知会员服务
94+阅读 · 2024年2月17日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员