Skip to content

Quantize with Confidence? An Empirical Study of Quantization for Code Generation

Jul 2026 · arXiv.org · Vol abs/2607.14181 · 0 citations · 101 references
Computer Science

TL;DR

Six state-of-the-art quantization methods are evaluated on two representative large code model families using the multilingual McEval and CoderEval benchmarks for Python and Java to provide practical guidance for selecting quantization strategies for deploying large code models on resource-constrained hardware.

Abstract

The growing adoption of local inference frameworks such as Ollama has made it increasingly common for developers to run large code models on laptops and other resource-constrained hardware. In these settings, post-training quantization is essential for reducing memory footprint and enabling practical deployment, yet its impact on generated code remains insufficiently understood. We empirically evaluate six state-of-the-art quantization methods (GPTQ, AWQ, QuIP#, AQLM, BitsAndBytes, and GGUF) on two representative large code model families, Qwen2.5-Coder and CodeLlama, using the multilingual McEval and CoderEval benchmarks for Python and Java. We assess functional correctness (pass@1) together with maintainability, reliability, security, and structural complexity. We also introduce a novel analysis of robustness under varying prompt complexity, characterized by Shannon entropy and token length. Our results show that quantization techniques differ meaningfully in their impact on correctness and code quality. AQLM consistently matches or exceeds the full-precision baseline, whereas QuIP# exhibits the largest correctness degradation, particularly on complex prompts. Security attributes remain stable across models, benchmarks, and programming languages, while robustness to prompt complexity varies across techniques. These findings provide practical guidance for selecting quantization strategies for deploying large code models on resource-constrained hardware and highlight the importance of evaluating quantized models beyond functional correctness.

View source

Similar papers

Jul 2026

Reliability Scaling Laws for Quantized Large Language Models

This study reveals that while the performance scales monotonically with the total number of bits, the reliability scalings are nonlinear, indicating that quantizing moderately sized models offers the best reliability-efficiency trade-off.

Sirine Ayadi, S'andor Dar'oczi, Stephan Günnemann et al. · 0 citations
Open access Jul 2026

Evaluating large language model compression: a comparative analysis on state-of-the-art models across diverse hardware platforms

Quantization, pruning, and parameter-efficient fine-tuning methods enabled models to match or outperform models with up to 18 times the parameters on SQuAD v2 while reducing storage as well as optimizer overhead and often improved task performance even when full fine-tuning failed.

Dominik Hildebrand, Benjamin Kiefer, Andreas Zell · 0 citations
Jul 2026

CoGate: Confidence-Gated Co-Decoding for Secure Code Generation

CoGate is proposed, a confidence-gated co-decoding approach that controls the expert's influence on the co-decoding process based on its confidence, and outperforms existing co-decoding methods (CoSec+) across multiple benchmarks.

Minghao Hu, Lannan Luo, Allen G. Roush et al. · 0 citations
Preprint Jul 2026

When Uncertainty Isn't Enough: An Empirical Study of Self-Correction in Code Generation

It is suggested that cheap uncertainty estimators are insufficient on their own to improve code correctness, and that their practical value lies in serving as gating signals for costlier execution-based correction loops rather than as standalone substitutes for verification.

Pranav Rakasi, Maanas Lalwani, A. Srivastava et al. · 0 citations
Conference Open access Aug 2026

FQTree: Fine-Grained Quantization and Hardware Generation of Boosted Decision Trees

This work presents the FQTree algorithm for fine-grained quantization-aware training of BDTs, together with the QXGB framework for automatic hardware generation, and applies this quantization during boosting so that later trees adapt to the errors of the already-quantized ensemble.

Zhi-Qiang Que, Chang Sun, Haiyan Wang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.