Quantize with Confidence? An Empirical Study of Quantization for Code Generation
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 70 of its 101 references that are in the map. First posted on arXiv 15 Jul 2026.
Builds on
70 of 101 references.
References · 70
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2016Pointer Sentinel Mixture Modelscited by 3,096
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,919
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
38 more
- 2022SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Modelscited by 1,386
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 906
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
- 2021A Survey of Quantization Methods for Efficient Neural Network Inferencecited by 815
- 2023Large Language Modelscited by 780
- 2023Distilling Step-by-Step! Outperforming Larger Language Models with Less Training Data and Smaller Model Sizescited by 737
- 2024QuaRot: Outlier-Free 4-Bit Inference in Rotated LLMscited by 634
- 2019Learned Step Size Quantizationcited by 628
- 2021Carbon Emissions and Large Neural Network Trainingcited by 567
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
- 2022ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformerscited by 526
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
- 2023OmniQuant: Omnidirectionally Calibrated Quantization for Large Language Modelscited by 424
- 2023QuIP: 2-Bit Quantization of Large Language Models With Guaranteescited by 414
- 2024QuIP#: Even Better LLM Quantization with Hadamard Incoherence and Lattice Codebookscited by 378
- 2023SpQR: A Sparse-Quantized Representation for Near-Lossless LLM Weight Compressioncited by 367
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2023LLM-QAT: Data-Free Quantization Aware Training for Large Language Modelscited by 324
- 2023SqueezeLLM: Dense-and-Sparse Quantizationcited by 294
- 2020ZeroQ: A Novel Zero Shot Quantization Frameworkcited by 269
- 2023A Survey on Model Compression for Large Language Modelscited by 269
- 2024Extreme Compression of Large Language Models via Additive Quantizationcited by 232
- 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 181
- 2023Structured Chain-of-Thought Prompting for Code Generationcited by 138
- 2024FlatQuant: Flatness Matters for LLM Quantizationcited by 131
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2023RPTQ: Reorder-based Post-training Quantization for Large Language Modelscited by 116
- 2025CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratingscited by 115
- 2023OWQ: Outlier-Aware Weight Quantization for Efficient Fine-Tuning and Inference of Large Language Modelscited by 114
- 2023PB-LLM: Partially Binarized Large Language Modelscited by 83
- 2023Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issuescited by 79
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPTcited by 71
- 2023On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilotcited by 64
50 most cited of 70 All 70 (JSON)
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Compressed code: the hidden effects of quantization and distillation on programming tokens
- 2024An exploration of the effect of quantisation on energy consumption and inference time of StarCoder2
- 2025Smaller = Weaker? Benchmarking Robustness of Quantized LLMs in Code Generation
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERT
- 2023Greener yet Powerful: Taming Large Code Generation Models with Quantization
- 2025CodeSimpleQA: Scaling Factuality in Code Large Language Models
- 2026Code Is More Than Text: Uncertainty Estimation for Code Generation