The large size of the KV cache has become a major bottleneck for serving LLMs with increasing context lengths. In response, many KV cache compression methods, such as token dropping and quantization, have been proposed. However, almost all of these methods are inherently lossy-despite minimal accuracy degradation for short outputs, their outputs increasingly diverge from full-KV-cache outputs as more tokens are decoded, which leads to catastrophic failures in code generation and tool calling. We present VeriCache, the first inference framework that ensures the same output as full-KV-cache decoding but largely preserves the high decoding throughput of a range of KV cache compression algorithms. VeriCache uses the compressed KV cache to draft tokens, then verifies them against the full KV cache. While it may seem like just speculative decoding, VeriCache requires addressing a key system challenge to work-keeping the full KV cache out of GPU memory and minimizing the overhead of swapping it in for verification. The insight is two-fold: (1) compressed-KV decoding can be parallelized with full-KV swap, because one is HBM-bandwidth-bound and the other is PCIe/network-bound, and (2) the compressed KV cache often produces output similar to the full KV cache, allowing a long drafting horizon to amortize each full-KV swap. VeriCache applies to both long-context decoding and remote prefix caching, supports a broad family of token-dropping and quantization methods through a uniform compressor interface, and composes with traditional speculative decoding. Experimental results show that VeriCache achieves up to 4X higher throughput than full-KV inference while producing identical outputs.


翻译:暂无翻译

0
下载
关闭预览

相关内容

TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
20项任务全面碾压BERT,全新XLNet预训练模型
机器学习算法与Python学习
15+阅读 · 2019年6月20日
手把手带你复现ICCV 2017经典论文—PyraNet
PaperWeekly
10+阅读 · 2018年11月9日
CycleGAN:图片风格,想换就换 | ICCV 2017论文解读
PaperWeekly
12+阅读 · 2018年3月14日
三味Capsule:矩阵Capsule与EM路由
PaperWeekly
10+阅读 · 2018年3月2日
Capsule Networks解析
机器学习研究会
11+阅读 · 2017年11月12日
YesOfCourse团队在Kaggle文本匹配竞赛中获得优异成绩
中国科学院网络数据重点实验室
10+阅读 · 2017年6月15日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月8日
VIP会员
最新内容
边缘计算的军事应用
专知会员服务
7+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
9+阅读 · 8月8日
《多域冲突比较支持模型》60页
专知会员服务
14+阅读 · 8月7日
相关资讯
20项任务全面碾压BERT,全新XLNet预训练模型
机器学习算法与Python学习
15+阅读 · 2019年6月20日
手把手带你复现ICCV 2017经典论文—PyraNet
PaperWeekly
10+阅读 · 2018年11月9日
CycleGAN:图片风格,想换就换 | ICCV 2017论文解读
PaperWeekly
12+阅读 · 2018年3月14日
三味Capsule:矩阵Capsule与EM路由
PaperWeekly
10+阅读 · 2018年3月2日
Capsule Networks解析
机器学习研究会
11+阅读 · 2017年11月12日
YesOfCourse团队在Kaggle文本匹配竞赛中获得优异成绩
中国科学院网络数据重点实验室
10+阅读 · 2017年6月15日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
0+阅读 · 2016年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员