解耦量化:专门化LLM预填充与解码

·

研究论文 · 2026/09/29

预填充和解码阶段对量化方法的需求不同:低精度算术可加速提示处理,而紧凑权重可减少生成过程中的内存流量。作者提出“分离式量化”(DQ),针对这两个阶段分别定制计算格式、权重和存储位置。在 Qwen 3 和 Gemma 3 上,仅在解码阶段移除激活量化,可在不增加推理成本的情况下提升解码密集型任务的准确率。训练独立的计算原生预填充权重,相比仅权重量化推理可加速提示处理,同时在 2-3 比特解码下,在解码密集型和预填充密集型任务上达到或超过其准确率。基于已发布的 Qwen3.8-27B GGUF 解码器,训练 NVFP4 预填充器可在不修改解码检查点的情况下,将 1 比特的 MMLU-Pro 准确率提升 32.5 个百分点、MMMU-Pro 提升 35.3 个百分点。为在单设备上容纳额外检查点,卸载式分离预填充(ODP)从 SSD 流式加载其权重,将加载开销按提示长度摊销。在同一 27B 模型上,ODP 在 llama.cpp 中 8K 提示长度下,相比仅权重基线实现 1.78 倍的首 token 时间加速。作者在 vLLM 中评估了分离式服务下的准确率,并通过对最高 2.8T 参数模型的后训练量化,进一步验证了共享权重格式的分离。

该工作针对 LLM 推理中预填充与解码阶段的不同瓶颈,提出按阶段分离量化的实用方案,并在多个模型规模上给出准确率与速度的实证结果,对高效推理系统设计具有参考价值。

Prefill and decode reward different approaches to quantization: low-precision arithmetic accelerates prompt processing, while compact weights reduce memory traffic during generation. We propose "disaggregated quantization" (DQ), which specializes computation formats, weights and storage placement to both of these phases. On Qwen 3 and Gemma 3, removing activation quantization specifically on decode improves accuracy on decode-heavy tasks without increasing inference cost. Training separate compute-native prefill weights accelerates prompt processing relative to weight-only inference while matching or exceeding its accuracy at 2-3-bit decode on both decode-heavy and prefill-heavy tasks. With released Qwen3.8-27B GGUF decoders, training an NVFP4 prefiller improves 1-bit accuracy by 32.5 points on MMLU-Pro and 35.3 on MMMU-Pro without modifying the decode checkpoint. To accommodate the additional checkpoint on a single device, offloaded disaggregated prefill (ODP) streams its weights from SSD, amortizing loading over prompt length. On the same 27B model, ODP delivers a 1.78x time-to-first-token speedup over the weight-only baseline at 8K prompt length in llama.cpp. We evaluate accuracy under disaggregated serving in vLLM and further validate shared-weight format disaggregation through post-training quantization on models up to 2.8T parameters.

阅读原文

参与讨论