Manuscript Offprint

arXiv:2611.02368

Beyond Accuracy: How Quantization Affects Coding Agents

Areej Mehboob, Muhammad Ali Shafique, Muhammad Usman Qadeer, Hamza Farooq

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

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.

1 Introduction

Large Language Models (LLMs) [Jaech et al., 2024, Team et al., 2025] are increasingly used in agentic coding systems that go beyond single-pass text generation. These agents can invoke execution tools, inspect program outputs, and revise their solutions over multiple steps [Hong et al., 2025, Guo et al., 2024, Lai et al., 2023, Chen et al., 2024]. This interaction changes how coding capability should be evaluated: a model that produces an incorrect program initially may still reach a correct solution after execution feedback. Recent benchmarks such as OJBench [Wang et al., 2025] provide challenging settings for studying this behavior. OJBench contains competition-level programming problems and places greater emphasis on reasoning and code correctness than typical interview-style benchmarks.

Efficient deployment of these agents remains challenging because repeated LLM inference and tool interaction increase computational and memory costs. Quantization is a widely used approach for reducing these costs [Frantar et al., 2023, Xiao et al., 2023, Liu et al., 2024]. In particular, weight-only methods such as AWQ and GPTQ can substantially reduce model storage while retaining high-precision activations. However, reasoning performance can be sensitive to low-bit quantization, especially on difficult tasks where small perturbations can affect multi-step generation [Liu et al., 2025]. Most existing studies evaluate this effect using single-pass model outputs. Coding agents introduce a different setting because quantization can influence not only the generated program, but also tool invocation, iterative refinement, and the final failure mode.

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: SLMs for Agentic Systems, Paris, France, 2026.

Table 1: Performance of Qwen-2.5-Coder and Devstral-Small-2507 agents (vLLM, OpenAI-compatible tool schema) on OJBench, reported as mean±std over 3 seeds. Darker shading marks the best overall accuracy per model family, lighter the second best. Overall accuracy is over the Easy and Medium splits (115 problems); the Hard split is excluded because all models scored 0%.

ModelPrecisionEasy (%)Medium (%)Overall (%)
Qwen-2.5-Coder-7BBF1621.29±1.61.69±0.77.83±0.9
AWQ20.37±1.61.27±0.07.25±0.5
GPTQ18.52±3.21.27±0.06.67±1.0
Qwen-2.5-Coder-14BBF1630.56±2.82.53±1.311.30±0.0
AWQ26.85±1.61.27±0.09.28±0.5
GPTQ26.85±8.92.11±0.79.86±2.7
Qwen-2.5-Coder-32BBF1632.41±1.65.48±3.213.91±2.3
AWQ25.93±5.83.80±0.010.72±1.8
GPTQ30.56±0.02.11±0.711.01±0.5
Devstral-Small-2507BF1611.11±2.81.69±0.74.64±1.3
AWQ15.74±8.51.69±0.76.09±2.6
GPTQ13.89±2.81.69±0.75.51±1.3

This distinction raises an important question: does similar final accuracy imply that a quantized coding agent behaves similarly to its full-precision counterpart? Our results suggest that it does not. Quantization can preserve final accuracy while changing solve trajectories, tool-use patterns, and terminal failure modes. These effects are hidden when coding agents are evaluated only by their final score. In this work, we present, to the best of our knowledge, the first empirical study of 4-bit weight-only quantization in execution-feedback coding agents. We evaluate BF16, AWQ, and GPTQ versions of Qwen2.5-Coder-Instruct [Hui et al., 2024] at 7B, 14B, and 32B scales, together with Devstral-Small-2507 [Mistral AI, 2025]. All models use vLLM with an OpenAI-compatible tool schema and a Python execution tool and are evaluated over three random seeds on OJBench. We investigate three research questions:

RQ1: How robust is end-to-end coding-agent performance to 4-bit quantization?

RQ2: Does end-to-end accuracy conceal changes in coding-agent solution trajectories?

RQ3: Does quantization change how coding agents fail, not just how often?

References (19)