KV-cache retrieval is essential for long-context LLM inference, yet existing methods struggle with distribution drift and high latency at scale. We introduce ParisKV, a drift-robust, GPU-native KV-cache retrieval framework based on collision-based candidate selection, followed by a quantized inner-product reranking estimator. For million-token contexts, ParisKV supports CPU-offloaded KV caches via Unified Virtual Addressing (UVA), enabling on-demand top-$k$ fetching with minimal overhead. ParisKV matches or outperforms full attention quality on long-input and long-generation benchmarks. It achieves state-of-the-art long-context decoding efficiency: it matches or exceeds full attention speed even at batch size 1 for long contexts, delivers up to 2.8$\times$ higher throughput within full attention's runnable range, and scales to million-token contexts where full attention runs out of memory. At million-token scale, ParisKV reduces decode latency by 17$\times$ and 44$\times$ compared to MagicPIG and PQCache, respectively, two state-of-the-art KV-cache Top-$k$ retrieval baselines.


翻译:键值缓存检索对于长上下文大语言模型推理至关重要,然而现有方法在大规模应用时面临分布漂移和高延迟的挑战。本文提出ParisKV,一种基于碰撞候选选择与量化内积重排序估计器的抗漂移、GPU原生键值缓存检索框架。针对百万令牌级上下文,ParisKV通过统一虚拟寻址技术支持CPU卸载的键值缓存,实现按需Top-$k$获取且开销极低。在长输入和长生成基准测试中,ParisKV达到或超越全注意力机制的质量表现。该框架实现了最先进的长上下文解码效率:在长上下文场景下即使批大小为1时也能达到或超过全注意力机制的速度,在全注意力机制可运行范围内提供高达2.8$\times$的吞吐量提升,并可扩展至全注意力机制内存溢出的百万令牌级上下文。在百万令牌规模下,相较于两种最先进的键值缓存Top-$k$检索基线方法MagicPIG和PQCache,ParisKV分别将解码延迟降低17$\times$和44$\times$。

0
下载
关闭预览

相关内容

PLM 与 LLM 时代的长文档检索综述
专知会员服务
17+阅读 · 2025年9月21日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
阿里巴巴语音识别模型 DFSMN 使用指南
人工智能头条
10+阅读 · 2018年12月13日
推荐|上交大推出Texygen:文本生成模型的基准测试平台
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员