arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.00231cs.LGcs.AI
收藏

KV缓存压缩的陷阱

The Pitfalls of KV Cache Compression

University of California, Los Angeles(加州大学洛杉矶分校)

Alex Chen, Renato Geh, Aditya Grover, Guy Van den Broeck, Daniel Israel

AI总结:

本文研究了KV缓存压缩在多指令提示中的问题,发现某些指令在压缩后性能下降明显,提出改进KV缓存淘汰策略以提升多指令任务表现。

摘要:

KV缓存压缩承诺在性能损失极小的情况下提高吞吐量和效率。尽管吞吐量的提升毋庸置疑,且近期文献确实显示在特定基准测试中降级极小,但在现实场景如多指令提示中压缩的后果尚不充分研究。本文识别了部署压缩KV缓存LLM时从业者应警惕的几个陷阱。我们评估了五种KV缓存压缩方法(StreamingLLM、SnapKV、TOVA、H2O和K-Norm)在Llama3.1 8B和Qwen2.5 14B上进行多指令提示的性能。重要的是,我们发现某些指令在压缩后降级速度极快,实际上导致LLM完全忽略这些指令。作为实际例子,我们强调系统提示泄露作为案例研究,实证展示了压缩对泄露和一般指令遵循的影响。我们识别出几个导致系统提示泄露的因素:压缩方法、指令顺序和KV淘汰偏见。然后我们提出简单的KV缓存淘汰策略修改,以减少这些因素的影响并提升多指令任务的整体性能。

英文摘要:

KV cache compression promises increased throughput and efficiency with negligible loss in performance. While the gains in throughput are indisputable and recent literature has indeed shown minimal degradation on particular benchmarks, in general the consequences of compression in realistic scenarios such as multi-instruction prompting have been insufficiently studied. In this paper, we identify several pitfalls that practitioners should be aware of when deploying KV cache compressed LLMs. We evaluate five KV cache compression methods (StreamingLLM, SnapKV, TOVA, H2O, and K-Norm) on Llama3.1 8B and Qwen2.5 14B under multi-instruction prompting with IFEval. Importantly, we show that certain instructions degrade much more rapidly with compression, effectively causing them to be completely ignored by the LLM. As a practical example, we highlight system prompt leakage as a case study, empirically demonstrating the impact of compression on leakage and general instruction-following. We identify several factors that contribute to system prompt leakage: compression method, instruction order, and KV eviction bias. We then propose simple changes to KV cache eviction policies that can reduce the impact of these factors and improve the overall performance in multi-instruction tasks.

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

↑