Papers
Topics
Authors
Recent
Search
2000 character limit reached

Smaller Models, Unexpected Costs: Trade-offs in LLM Quantization for Automated Program Repair

Published 25 Jun 2026 in cs.SE | (2606.27205v1)

Abstract: LLMs are powerful toolsand have been increasingly adopted for complex software engineering tasks. As the number of parameters increases, results can often be improved, but this also imposes substantialmemory requirements. While quantization effectively reduces thememory footprint, its overall impact is often summarized onlyby benchmark scores, which mask changes in model behaviorand non-functional overheads. In this work, we conduct anempirical evaluation of LLM quantization using AutomatedProgram Repair (APR), a complex task in software engineering.We analyze 13 quantization configurations spanning differentbit-widths, methods, and target components (weights and KVcache) across six representative LLMs, evaluated on two APRbenchmarks (HumanEval-Java and Defects4J). Our findings reveal that base and quantized models can provide different sets of repaired problems with little overlap, whileretaining a comparable number of repaired problems. Althoughquantization successfully reduces memory footprints by up to85%, it increases both inference time and energy consumption,which we attribute to suboptimal hardware utilization. OurPareto trade-off analysis shows that 48% of the configurationsevaluated are strictly dominated by alternatives. Rather thanidentifying a superior quantization method, our findings highlightthat the trade-offs between effectiveness, memory footprint,and energy efficiency are sensitive to the underlying modelarchitecture and the complexity of the task.

Summary

  • The paper demonstrates that 4-bit quantization often enhances patch plausibility in automated program repair while introducing noticeable behavioral drift.
  • The paper employs rigorous evaluations across six LLMs using multiple PTQ methods on HumanEval-Java and Defects4J benchmarks, measuring pass@10 and Jaccard Consistency Rate.
  • The paper reveals that although quantization can reduce memory usage by up to 85%, it unexpectedly increases inference time and GPU energy consumption due to inefficient integer kernel utilization.

Quantization in LLMs for Automated Program Repair: Effectiveness and Efficiency Trade-offs

Problem Context and Motivation

Quantization is widely adopted to compress LLMs by reducing numeric precision in model weights, activations, or KV caches. This approach is motivated by the escalating hardware, energy, and memory costs of deploying large LLMs in practical contexts such as Automated Program Repair (APR). Existing studies have typically restricted themselves to a single quantization method, benchmark, or efficiency metric, lacking a holistic evaluation of the trade-offs in effectiveness and efficiency. The study "Smaller Models, Unexpected Costs: Trade-offs in LLM Quantization for Automated Program Repair" (2606.27205) addresses this gap by analyzing 13 quantization configurations—including weight-only and KV-cache methods ranging from 2–8 bits—across six LLMs on two APR benchmarks: HumanEval-Java and Defects4J.

Experimental Design and Metrics

The empirical setup employs PTQ quantization methods (AQLM, AWQ, BitsAndBytes, HQQ, Quanto) and applies them to Llama, DeepSeek-Coder, and Mistral models spanning 6.7B–70B parameters. Evaluation proceeds on two benchmarks: HumanEval-Java (164 problems with injected bugs) and Defects4J (525 single-function Java bugs). Effectiveness is measured by pass@10 (plausibility) and Jaccard Consistency Rate (JCR)—the latter quantifying overlap between solved problem sets for the base and quantized models, thus revealing behavioral drift. Efficiency metrics include inference time, GPU energy consumption, in-memory model size, and peak inference memory, all rigorously analyzed using statistical bootstrapping and Pareto-front dominance.

Effectiveness of Quantized Models in APR

Contrary to conventional expectations, lowering weight precision does not generally degrade repair performance. Across 11 of 12 cases, at least one quantization method yields more plausible patches than the base model, especially with 4-bit configurations. For HumanEval-Java, hqq4_4(KV) and quanto4_4(M) outperform base models with improvements up to 19%. Defects4J displays even greater gains, with DeepSeek-6.7B under quanto4_4(M) doubling plausible patch count. However, extreme quantization (2–3 bits) degrades both performance and output quality, producing nonsensical or partial code.

Consistency analysis reveals high aggregate plausibility does not guarantee behavioral equivalence. The JCR metric uncovers cases of significant drift—quantized models may solve a substantially different set of bugs than their base counterparts, even when raw counts are similar. This phenomenon is vividly captured in Defects4J JCR heatmap, indicating configuration-dependent behavioral instability. Figure 1

Figure 1: Defects4J JCR heatmap by model and configuration; higher values indicate greater solved-set consistency with the baseline.

Efficiency Analysis: Inference Time, Energy, and Memory

All quantization configurations unexpectedly increase inference time and GPU energy consumption, at odds with consensus in the literature on other tasks. The most pronounced penalty is observed for hqq3_3 quantization, where inference times exceed base models by 800–900%, and energy consumption rises similarly. The underlying cause is attributed to inefficient integer kernel utilization on GPUs and frequent dequantization overheads. KV-cache quantization mildly mitigates these costs, but rarely provides dominant efficiency gains.

Memory footprint, both in terms of in-memory model size and peak inference memory, is substantially reduced by model weight quantization. AQLM2_2 achieves up to 85% reduction, while higher-bit (8-bit) configurations remain more modest. KV-cache quantization is less effective for memory savings, due to its dependency on input prompt length.

Effectiveness-Efficiency Trade-offs and Pareto Analysis

Pareto-dominance analysis across effectiveness and all efficiency metrics uncovers that 48% of quantization configurations are strictly dominated, offering neither optimal repair capability nor efficiency. Weight quantization methods such as aqlm2_2, awq4_4, and bnb4_4 are consistently Pareto-optimal, while hqq3_3, hqq8_8, and low-bit KV quantizations are generally suboptimal. Trade-off frontiers show that substantial memory reductions are attainable only at moderate to severe costs in plausibility and energy. Figure 2

Figure 2: Number of models in which each quantization configuration appears on the Pareto front.

Figure 3

Figure 3: Pareto frontier (+ base model) for each model and benchmark, considering plausibility (pass@10) and in-memory model size. The x-axis shows in-memory model size reduction (lower is better), while the y-axis shows plausibility (higher is better).

Implications and Future Perspectives

The findings underscore several implications for AI and APR practitioners:

  • Quantization-induced drift: Quantization can induce non-trivial behavioral drift in problem-solving, which is masked by aggregate metrics. Practitioners should validate solved-set overlap, not just raw plausibility.
  • Efficiency trade-offs: Quantization reliably reduces memory footprint but may increase inference time and energy, particularly with poorly optimized low-bit configurations on GPUs.
  • Configuration sensitivity: The optimal quantization configuration is model- and context-dependent; nearly half of configurations are suboptimal. AWQ4_40 and quanto4_41 emerge as relatively safe choices balancing effectiveness and memory savings.
  • Routing policies: Intelligent dispatching to quantized or full-precision models may be necessary to jointly optimize effectiveness and efficiency in multi-LLM pipelines.
  • Hardware bottlenecks: Integer kernel optimization on GPUs and dequantization overheads need further investigation; results may differ on resource-constrained consumer GPUs.

Conclusion

Quantization in LLMs for APR yields nuanced trade-offs: substantial reductions in memory footprint are achievable, but at the expense of increased inference time and energy, along with possible behavioral drift. The choice of quantization configuration is critical and context-sensitive. Future research should expand method diversity, probe behavioral shifts more deeply, and engineer adaptive routing policies within multi-LLM repair ecosystems. This study provides an empirical foundation for robust, memory-efficient APR systems, highlighting that quantization, while powerful, introduces complex and sometimes unexpected costs.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.