arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.08635cs.LGcs.DC
收藏

SpectrumKV: 面向预填充-解码分离式LLM服务的逐令牌混合精度KV缓存传输

SpectrumKV: Per-Token Mixed-Precision KV Cache Transfer for Prefill-Decode Disaggregated LLM Serving

Yang Pengju

AI总结:

针对预填充-解码分离架构中KV缓存传输开销大的问题,提出SpectrumKV,通过为每个令牌分配不同精度(FP16/INT8/INT4)实现混合精度传输,并设计轻量部署探测自适应选择精度策略,在相同传输预算下显著提升模型质量并降低TTFT。

摘要:

预填充-解码(PD)分离将提示处理与令牌生成解耦,但也使键值(KV)缓存成为网络负载。现有的PD端KV缩减方法大多是二元的:选中的令牌以全精度传输,其余则不传输。本文认为二元选择留下了一个有用的设计空间未被利用。SpectrumKV为每个令牌分配一个精度级别:注意力汇聚点和其他高重要性令牌以FP16保护,中等重要性令牌以INT8发送,低重要性令牌在模型可容忍时以INT4发送。主要的实际复杂性在于INT4容忍度是模型相关的。Qwen2.5-7B在INT4 KV量化下灾难性失败,而Mistral-7B和Gemma-2-9B保持稳定。因此,SpectrumKV运行一个轻量级的部署时探测:在三级策略下进行三次激进的NIAH试验。通过的模型使用FP16+INT8+INT4;失败的模型回退到FP16+INT8。在Qwen2.5-7B-Instruct、Mistral-7B-Instruct-v0.3和Gemma-2-9B-it上,SpectrumKV在相同传输预算下提高了质量。在WikiText-2上,归一化KV预算为50%时,SpectrumKV分别将困惑度改变+1.97%、-0.06%和-0.44%,而PDTrim为+25.85%、+22.07%和+35.63%。在4096令牌的NIAH检索中,自适应策略在激进预算b=0.3下对Qwen达到52.6%,而PDTrim为26.3%,并在b=0.5时达到100%;Mistral和Gemma在三级策略下保持检索性能。传输路径的端到端GPU计时显示,在b=0.5时TTFT降低50-62%。这些结果表明,PD KV传输应被视为精度分配问题,而不仅仅是令牌剪枝。

英文摘要:

Prefill-decode (PD) disaggregation decouples prompt processing from token generation, but it also turns the key-value (KV) cache into a network payload. Existing PD-side KV reduction methods are mostly binary: selected tokens are transmitted at full precision and the rest are not transmitted. This paper argues that binary selection leaves a useful design space unused. SpectrumKV assigns a precision level to each token instead: attention sinks and other high-importance tokens are protected at FP16, medium-importance tokens are sent at INT8, and low-importance tokens are sent at INT4 when the model can tolerate it. The main practical complication is that INT4 tolerance is model-dependent. Qwen2.5-7B catastrophically fails under INT4 KV quantization, while Mistral-7B and Gemma-2-9B remain stable. SpectrumKV therefore runs a lightweight deployment-time probe: three aggressive NIAH trials under a 3-tier policy. Models that pass use FP16+INT8+INT4; models that fail fall back to FP16+INT8. Across Qwen2.5-7B-Instruct, Mistral-7B-Instruct-v0.3, and Gemma-2-9B-it, SpectrumKV improves quality at the same transfer budget. At a 50% normalized KV budget on WikiText-2, SpectrumKV changes perplexity by +1.97%,-0.06%, and-0.44%, respectively, compared with PDTrim's +25.85%, +22.07%, and +35.63%. On NIAH retrieval at 4096 tokens, the adaptive policy reaches 52.6% on Qwen at the aggressive b=0.3 budget versus 26.3% for PDTrim, and reaches 100% by b=0.5; Mistral and Gemma preserve retrieval under the 3-tier policy. End-to-end GPU timing of the transfer path shows 50-62% TTFT reductions at b=0.5. These results suggest that PD KV transfer should be treated as a precision-allocation problem, not only as token pruning.

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

↑