Quantization Hurts Reasoning? An Empirical Study on Quantized Reasoning Models
这篇论文对量化推理模型进行了系统性研究,评估了不同量化方法对推理模型性能的影响,并提出了针对推理模型的无损量化配置和推荐量化算法。
更新于 2025-04-09。作者:Ruikang Liu、Yuxuan Sun、Manyi Zhang、Haoli Bai、Xianzhi Yu、Tiezheng Yu、Chun Yuan、Lu Hou。
中文摘要
近期推理语言模型在复杂任务中的表现令人瞩目,但它们扩展的思考链推理过程增加了推理开销。虽然量化已被广泛采用以降低大型语言模型的推理成本,但其对推理模型的影响仍研究不足。在本研究中,我们首次对量化推理模型进行了系统研究,评估了从1.5B到70B参数范围的开放源代码DeepSeek-R1-Distilled Qwen和LLaMA系列,以及QwQ-32B。我们的研究涵盖了使用最先进算法在可变位宽下进行的权重、KV缓存和激活量化,并在数学(AIME、MATH-500)、科学(GPQA)和编程(LiveCodeBench)推理基准上进行了广泛的评估。我们的发现表明,虽然可以使用W8A8或W4A16量化实现无损量化,但较低的位宽引入了显著的精度风险。我们进一步确定了模型大小、模型来源和任务难度是性能的关键决定因素。与预期相反,量化模型并没有表现出输出长度的增加。此外,策略性地调整模型大小或推理步骤可以有效提升性能。所有量化模型和代码将在https://github.com/ruikangliu/Quantized-Reasoning-Models上开源。
英文摘要
Recent advancements in reasoning language models have demonstrated remarkable performance in complex tasks, but their extended chain-of-thought reasoning process increases inference overhead. While quantization has been widely adopted to reduce the inference cost of large language models, its impact on reasoning models remains understudied. In this study, we conduct the first systematic study on quantized reasoning models, evaluating the open-sourced DeepSeek-R1-Distilled Qwen and LLaMA families ranging from 1.5B to 70B parameters, and QwQ-32B. Our investigation covers weight, KV cache, and activation quantization using state-of-the-art algorithms at varying bit-widths, with extensive evaluation across mathematical (AIME, MATH-500), scientific (GPQA), and programming (LiveCodeBench) reasoning benchmarks. Our findings reveal that while lossless quantization can be achieved with W8A8 or W4A16 quantization, lower bit-widths introduce significant accuracy risks. We further identify model size, model origin, and task difficulty as critical determinants of performance. Contrary to expectations, quantized models do not exhibit increased output lengths. In addition, strategically scaling the model sizes or reasoning steps can effectively enhance the performance. All quantized models and codes will be open-sourced in https://github.com/ruikangliu/Quantized-Reasoning-Models.
解读
一句话总结
这篇论文对量化推理模型进行了系统性研究,评估了不同量化方法对推理模型性能的影响,并提出了针对推理模型的无损量化配置和推荐量化算法。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:推理语言模型在复杂推理任务中表现出色,但其推理过程增加推理开销,而量化可以降低推理成本,但其对推理模型的影响尚不明确。
- 现有方案不足:现有量化方法大多针对非推理语言模型,其性能在推理模型上尚未充分探索。
- 研究目标:评估不同量化方法对推理模型性能的影响,并探索针对推理模型的量化方法。
问题2:论文的核心创新点是什么?
- 技术创新:对量化推理模型进行了系统性研究,评估了不同量化方法对推理模型性能的影响。
- 方法改进:提出了针对推理模型的无损量化配置和推荐量化算法。
- 优势:为推理模型量化提供了有益的指导,有助于提高推理效率。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:评估了不同量化方法对推理模型在数学、科学和编程推理基准上的性能影响。
- 性能提升:8位权重-激活量化可以无损地保留精度,4位权重量化或KV缓存量化也实现了近无损结果(≤1%的下降)。
- 对比结果:与基线方法相比,量化模型在性能上有所提升。
问题4:这个研究的实际应用价值是什么?
- 应用场景:推理语言模型在多领域问题回答、数学竞赛等复杂推理任务中的应用。
- 实施建议:根据任务难度和模型规模,选择合适的量化方法。
- 局限与展望:进一步研究量化误差的累积机制,提高量化推理模型的性能。
来源
机器可读索引:llms.txt