Mix-Quant: 量化预填,精准解码用于代理大语言模型
Mix-Quant: Quantized Prefilling, Precise Decoding for Agentic LLMs
AI总结:
本文提出Mix-Quant,一种简单有效的阶段感知量化框架,用于加速代理大语言模型的推理。通过在预填阶段应用高吞吐量NVFP4量化,同时保留BF16精度用于解码,从而在保持任务性能的同时显著提高效率,实现预填阶段高达3倍的速度提升。
摘要:
LLM代理最近作为一种通过规划、工具使用、记忆检索和多步交互解决复杂任务的强大范式出现。然而,这些代理工作流往往引入显著的输入侧开销,使计算密集型的预填阶段成为长上下文、多轮推理中的关键瓶颈。在本工作中,我们提出Mix-Quant,一种简单有效的阶段感知量化框架,用于加速代理推理。我们首先研究了FP4量化在代理LLM工作流中的应用,并发现对整个推理过程进行量化会导致显著的性能下降。相比之下,预填阶段表现出显著的量化冗余,因此可以以最小的精度损失进行量化,尽管它是计算的主要来源。基于这一见解,我们将在预填阶段应用高吞吐量NVFP4量化,同时保留BF16精度用于解码。通过将预填加速与解码质量解耦,Mix-Quant结合了阶段感知的算法量化与硬件高效的NVFP4执行,以缓解LLM代理的推理瓶颈。在长上下文和代理基准测试中的广泛实验表明,Mix-Quant在保持任务性能的同时,实现了显著的效率提升,预填阶段可达3倍的速度提升。
英文摘要:
LLM agents have recently emerged as a powerful paradigm for solving complex tasks through planning, tool use, memory retrieval, and multi-step interaction. However, these agentic workflows often introduce substantial input-side overhead, making the compute-intensive prefilling stage a key bottleneck in long-context, multi-turn inference. In this work, we propose Mix-Quant, a simple and effective phase-aware quantization framework for fast agentic inference. We first investigate FP4 quantization in agentic LLM workflows and observe that quantizing the entire inference process can incur significant performance degradation. In contrast, the prefilling stage exhibits substantial quantization redundancy and can therefore be quantized with minimal accuracy loss, despite being the dominant source of computation. Based on this insight, we apply high-throughput NVFP4 quantization to the prefilling phase while preserving BF16 precision for decoding. By decoupling prefilling acceleration from decoding quality, Mix-Quant combines phase-aware algorithmic quantization with hardware-efficient NVFP4 execution to alleviate the inference bottleneck in LLM agents. Extensive experiments across long-context and agentic benchmarks demonstrate that Mix-Quant largely preserves task performance while delivering significant efficiency improvements, achieving up to a 3x speedup during prefilling.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。