arXiv:2608.21362cs.AIcs.DC2026-08

让大模型推理更快:不依赖前缀匹配,也能复用缓存。

KVBoost: Chunk-Level Key-Value Cache Reuse with Deviation-Guided Recomputation for Efficient Large Language Model Inference

论文配图:KVBoost: Chunk-Level Key-Value Cache Reuse with Deviation-Guided Recomputation for Efficient Large Language Model Inference
图 1 · 摘自论文原文
  • 按块分割缓存,用双重哈希区分位置和内容,支持任意位置复用。
  • 通过选择性重计算和偏差探测,修复分块带来的注意力错误,提速4.49倍。
  • 兼容现有模型,无需修改架构,适合部署在资源受限的推理场景。

基于Transformer的大语言模型在预填充阶段因需为每请求重新计算键值(KV)张量而产生高延迟。现有前缀缓存系统虽能降低此开销,但要求提示共享连续前缀,当共享内容出现在任意位置时效果受限。我们提出KVBoost,一个针对HuggingFace兼容解码器模型的块级KV缓存复用系统,实现不依赖内容位置的复用。该系统采用双哈希键控方案,将位置身份(前缀哈希)与内容身份(内容哈希)分离,支持精确与近似匹配。为解决独立缓存块引发的注意力边界错误,引入两种修复策略:选择性重计算(仅重编码边界区域),以及探针后识别并重计算高偏差令牌的缓存融合重计算。系统还集成非对称量化(int8/int4)、自适应块边界划分及重要性加权淘汰,在固定内存预算下优化性能。在Qwen/Qwen2.5-3B上对1000个缺陷定位样本评估,KVBoost将首次令牌生成时间从639.1毫秒降至142.4毫秒,加速4.49倍,较前缀缓存提升16%,准确率保持99.2%(前缀缓存为99.1%)。该系统提供一种无需架构修改、兼容RoPE模型的实用、内存受限推理加速层。

原文摘要 · Abstract (English)

Transformer-based large language models (LLMs) incur high prefill latency because key-value (KV) tensors must be recomputed for each request. Existing prefix-caching systems reduce this cost but require prompts to share a leading contiguous prefix, limiting effectiveness when shared content appears at arbitrary positions. We present KVBoost, a chunk-level KV cache reuse system for HuggingFace-compatible decoder models that enables reuse regardless of content position. KVBoost introduces a dual-hash keying scheme that separates positional identity (prefix hash) from content identity (content hash), supporting both exact and approximate cache matches. To address attention boundary errors from independently cached chunks, KVBoost employs two repair strategies: SelectiveRecompute, which re-encodes boundary regions, and CacheBlendRecompute, which identifies and recomputes high-deviation tokens after a probe pass. The system further incorporates asymmetric KV quantization (int8/int4), adaptive chunk boundary splitting, and importance-weighted eviction under a fixed memory budget. Evaluated on Qwen/Qwen2.5-3B over 1,000 bug-localization samples, KVBoost achieves a 4.49x reduction in time-to-first-token (142.4 ms vs.\ 639.1 ms) and outperforms prefix caching by 16%, with no loss in accuracy (99.2% vs.\ 99.1%). KVBoost provides a practical, memory-bounded inference acceleration layer compatible with RoPE-based models without architectural modification.

大模型推理缓存优化高效生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。