arXiv:2607.01831cs.DCcs.LG2026-07

通过分层传输键值缓存,实现长文本推理的低延迟高精度。

Lynx: Progressive Speculative Quantization for accelerating KV Transfer in Long-Context Inference

论文配图:Lynx: Progressive Speculative Quantization for accelerating KV Transfer in Long-Context Inference
图 1 · 摘自论文原文
  • 将键值缓存分为关键位和残差位,先传关键位启动解码
  • 解码过程中并行传输残差位,实测首令牌延迟提升1.43倍
  • 兼顾速度与精度,适合长文本生成等高性能推理场景

长上下文推理在大语言模型服务中日益普遍,主要由检索增强生成和智能体系统驱动。在分离式推理中,此类任务需在网络上传输大量键值(KV)缓存,解码必须等待传输完成才能开始。现有KV量化技术虽能减少数据量,但难以同时实现低网络延迟和高推理精度。本文挑战了KV缓存必须完整接收才可使用这一假设。基于观察:不同比特对注意力计算和精度贡献不均——最高有效位捕捉注意力粗结构,最低有效位提升精度,因此可在接收部分缓存时即开始解码。我们提出Lynx系统,通过将KV缓存划分为高优先级的Anchor流(携带最高有效位)和低优先级的Residual流(携带剩余精度),实现分流水线传输。解码在接收到Anchor流后即可启动,并在后续并发传输Residual流的过程中进行推测性执行,最后通过验证确保结果与高精度(BF16)解码一致。在多个模型和部署场景下,Lynx在首令牌延迟(TTFT)上达到4位量化水平,同时保持BF16精度,相比标准8位量化提升最大1.43倍,相比当前最优方案精度提升最高达5.1%。

原文摘要 · Abstract (English)

Long-context inference is increasingly common in large language model (LLM) serving, driven by retrieval-augmented generation and agentic systems. In disaggregated inference, these workloads require transferring large Key-Value (KV) caches across the network, where decoding cannot begin until the transfer completes. Recent KV quantization techniques reduce data volume and alleviate this bottleneck, but existing schemes fail to achieve both low network-exposed latency and high inference accuracy. We challenge the assumption that the KV cache is an indivisible unit that must be fully received before use. We leverage the observation that different bits in the KV cache contribute unequally to attention computation and inference precision: the most significant bits capture the coarse structure of attention and the least significant bits refine precision. This property enables partial use of the KV cache during decoding. We present Lynx, a system that enables progressive, split-stream KV transfer by partitioning the KV cache into a high-priority Anchor stream carrying the most significant bits and a low-priority Residual stream carrying remaining precision. Decoding begins upon receipt of the Anchor stream and proceeds speculatively while the Residual stream is transferred concurrently, followed by verification that ensures equivalence to higher-precision decoding. Across multiple models and serving workloads, Lynx achieves Time-to-First-Token (TTFT) comparable to aggressive 4-bit KV quantization, while matching the accuracy of high-precision (BF16) inference, improving TTFT over standard 8-bit KV quantization by up to $1.43\times$ and improving accuracy over state-of-the-art by up to $5.1\%$.

推理加速量化长文本生成

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