Beyond Accuracy: How Quantization Affects Coding Agents

📄 arXiv: 2611.02368v1 📥 PDF

作者: Areej Mehboob, Muhammad Ali Shafique, Muhammad Usman Qadeer, Hamza Farooq

分类: cs.CL, cs.AI

发布日期: 2026-11-02

备注: Accepted at the NeurIPS 2026 Workshop on Small Language Models for Agentic Systems (SLM-Agents), Paris, France


💡 一句话要点

探讨量化对编码智能体行为的影响

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 量化技术 编码智能体 大型语言模型 行为分析 鲁棒性评估

📋 核心要点

  1. 现有编码智能体在执行和修订程序时,量化对其行为的影响尚未被深入研究,导致对其鲁棒性评估不足。
  2. 本文通过比较不同量化方法(BF16、4-bit AWQ和GPTQ)在多种模型上的表现,探讨量化对编码智能体的具体影响。
  3. 实验结果显示,尽管最终准确性未显著下降,但量化导致智能体在解决问题时的行为发生了显著变化,特别是在失败模式上。

📝 摘要(中文)

随着智能体在编码任务中的应用日益增加,大型语言模型(LLMs)的推理成本限制了其运行环境。量化技术可以减少模型大小,但其对执行和修订程序的编码智能体的影响尚未得到充分研究。本文比较了BF16、4-bit AWQ和GPTQ在不同模型(Qwen2.5-Coder-Instruct和Devstral-Small-2507)上的表现,发现尽管没有显著的准确性损失,但量化对智能体行为的影响显著。具体而言,AWQ导致Qwen-7B的单次解决能力显著下降,同时循环解决能力有所提升。研究表明,评估编码智能体的量化鲁棒性应考虑解决路径、工具使用和失败模式,而不仅仅是最终准确性。

🔬 方法详解

问题定义:本文旨在探讨量化技术对编码智能体在执行和修订程序时的影响,现有研究未能充分揭示这一领域的复杂性和挑战。

核心思路:通过比较不同量化方法(BF16、4-bit AWQ和GPTQ),分析它们对编码智能体行为的影响,尤其是解决路径和失败模式的变化。

技术框架:研究采用OJBench编码问题作为测试基准,分析不同模型(Qwen2.5-Coder-Instruct和Devstral-Small-2507)在量化后的表现,重点关注解决能力和错误类型。

关键创新:本研究的创新点在于强调量化对编码智能体行为的深远影响,提出应通过解决路径和工具使用等多维度评估其鲁棒性,而非仅依赖最终准确性。

关键设计:在实验中,采用了多种量化方法,并通过多次实验(不同种子)确保结果的可靠性,关注不同模型在量化后的表现差异。具体参数设置和损失函数未详细披露,需进一步研究。

📊 实验亮点

实验结果显示,AWQ方法使Qwen-7B的单次解决能力从17降至0,而循环解决能力从10提升至25。Qwen-32B在成功案例中均涉及工具使用,而Devstral在有效调用执行器方面表现较差。量化后,Qwen-32B的编译错误显著增加,表明不同模型在量化后的失败模式存在显著差异。

🎯 应用场景

该研究为编码智能体在实际应用中的量化技术选择提供了重要参考,尤其是在资源受限的环境中。通过理解量化对智能体行为的影响,可以优化智能体在编程任务中的表现,提升其在实际应用中的有效性和可靠性。未来,研究结果可能推动更高效的编码智能体设计与应用。

📄 摘要(原文)

Agents are increasingly used for coding tasks, but the inference cost of large language models (LLMs) limits where they can run. Quantization reduces model size, but its effects on coding agents that execute and revise programs remain underexplored. We compare BF16 with 4-bit AWQ and GPTQ for Qwen2.5-Coder-Instruct (7B, 14B, and 32B) and Devstral-Small-2507 (24B) on OJBench coding problems across three seeds. We detect no statistically significant accuracy loss for any of the coding agents. However, final accuracy can conceal substantial behavioral changes: AWQ reduces Qwen-7B one-shot solves from 17 to 0 while increasing loop-based solves from 10 to 25. All Qwen-32B successes involve tool use, whereas Devstral rarely makes a valid executor call. Failure profiles also differ: Qwen-32B produces far more compilation errors than the smaller Qwen models, rising slightly under quantization, while Devstral's failures shift significantly from runtime errors toward wrong answers and timeouts. These findings indicate that quantization robustness in coding agents should be assessed through solution trajectories, tool use, and failure modes, in addition to final accuracy.