量化草稿KV Cache实现内存高效投机解码
Memory-Efficient Speculative Decoding with Quantized Draft KV Cache
通过量化草稿模型KV Cache降低投机解码的额外内存占用,目标模型缓存与验证器保持BF16以不改变最终修正规则。研究提出K4V4量化方案,键采用逐通道、值采用逐 token 量化,在六组模型对上草稿缓存内存减少66.20%、双缓存合计减少23.95%,平均接受率从57.93%降至57.14%。
arXiv:2611.20565v1 Announce Type: new Abstract: Speculative decoding reduces generation cost, but it stores two KV caches: one for the target model and one for the draft model. We reduce this extra memory by quantizing the draft cache. The target cache and verifier remain in BF16, so that compression cannot change the target model's final correction rule. We first study how to divide precision between keys and values. A naive per-token quantizer makes keys appear much more sensitive: splitting a 12-bit budget, K8V4 beats K4V8 in acceptance by 10.87pp. However, with grouped per-channel keys, the gap becomes -0.25pp. A controlled Qwen test confirms that changing only the key quantizer can erase or reverse the preferred bit split. Hence, following KIVI, we propose K4V4 quantization with per-channel keys and per-token values. Across six model pairs, our method reduces draft cache memory by 66.20%, and combined memory across both caches by 23.95%. Mean acceptance drops from 57.93% to 57.14%, only 1.36% relative. Overall, quantized draft caches can make speculative decoding more memory efficient; as a predictive principle for efficient AI design, key and value precision must be co-designed with the quantizer layout.
来源:arXiv (AI + Vision + Imaging) · arxiv.org