Greener yet Powerful: Taming Large Code Generation Models with Quantization
Not on the map. Why?
Abstract (arXiv)
ML-powered code generation aims to assist developers to write code in a more productive manner, by intelligently generating code blocks based on natural language prompts. Recently, large pretrained deep learning models have substantially pushed the boundary of code generation and achieved impressive performance. Despite their great power, the huge number of model parameters poses a significant threat to adapting them in a regular software development environment, where a developer might use a standard laptop or mid-size server to develop her code. Such large models incur significant resource usage (in terms of memory, latency, and dollars) as well as carbon footprint. Model compression is a promising approach to address these challenges. Several techniques are proposed to compress large pretrained models typically used for vision or textual data. Out of many available compression techniques, we identified that quantization is mostly applicable for code generation task as it does not require significant retraining cost. As quantization represents model parameters with lower-bit integer (e.g., int8), the model size and runtime latency would both benefit from such int representation. We extensively study the impact of quantized model on code generation tasks across different dimension: (i) resource usage and carbon footprint, (ii) accuracy, and (iii) robustness. To this end, through systematic experiments we find a recipe of quantization technique that could run even a 6B model in a regular laptop without significant accuracy or robustness degradation. We further found the recipe is readily applicable to code summarization task as well.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 36 of its 52 references that are in the map. First posted on arXiv 9 Mar 2023.
Builds on
36 of 52 references.
References · 36
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,167
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
- 2019Green AIcited by 627
- 2021Carbon Emissions and Large Neural Network Trainingcited by 567
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
24 more
- 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 482
- 2018Generating Natural Language Adversarial Examplescited by 424
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
- 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 345
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2017DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Carscited by 251
- 2020Towards the Systematic Reporting of the Energy and Carbon Footprints of Machine Learningcited by 249
- 2019Machine Learning Testing: Survey, Landscapes and Horizonscited by 218
- 2019Structured Pruning of Large Language Modelscited by 203
- 2021Block Pruning For Faster Transformerscited by 177
- 2019SPoC: Search-based Pseudocode to Codecited by 176
- 2022Structured Pruning Learns Compact and Accurate Modelscited by 170
- 2020TernaryBERT: Distillation-aware Ultra-low Bit BERTcited by 148
- 2018DeepGauge: Multi-Granularity Testing Criteria for Deep Learning Systemscited by 147
- 2021Understanding and Overcoming the Challenges of Efficient Transformer Quantizationcited by 141
- 2021Robustness Gym: Unifying the NLP Evaluation Landscapecited by 108
- 2022Compression of Generative Pre-trained Language Models via Quantizationcited by 79
- 2021NL-Augmenter: A Framework for Task-Sensitive Natural Language Augmentationcited by 73
- 2021Selective Knowledge Distillation for Neural Machine Translationcited by 43
- 2022DQ-BART: Efficient Sequence-to-Sequence Model via Joint Distillation and Quantizationcited by 23
- 2020Adversarial Attack and Defense of Structured Prediction Modelscited by 20
- 2021Interpreting the Robustness of Neural NLP Models to Textual Perturbationscited by 17
- 2019Improving Neural Machine Translation Robustness via Data Augmentation: Beyond Back Translationcited by 16
Built on by
Citing papers per year: 2024: 2; 2025: 1; 2026: 1.
4 papers.
- 2024Model Compression and Efficient Inference for Large Language Models: A Surveycited by 64
- 2024Bifurcated Attention: Accelerating Massively Parallel Decoding with Shared Prefixes in LLMscited by 7
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Taskscited by 2
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Tasks21 Aug 2025
- 2024Bifurcated Attention: Accelerating Massively Parallel Decoding with Shared Prefixes in LLMs13 Mar 2024
- 2024Model Compression and Efficient Inference for Large Language Models: A Survey15 Feb 2024
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
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generation
- 2024Evaluating Quantized Large Language Models for Code Generation on Low-Resource Language Benchmarks
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERT
- 2025Smaller = Weaker? Benchmarking Robustness of Quantized LLMs in Code Generation
- 2024Comprehensive Study on Performance Evaluation and Optimization of Model Compression: Bridging Traditional Deep Learning and Large Language Models
- 2026Fine-Tuning Low-Bit Models with Gradient in Quantized Code Space