On the Compression of Language Models for Code: An Empirical Study on CodeBERT
Not on the map. Why?
Abstract (arXiv)
Language models have proven successful across a wide range of software engineering tasks, but their significant computational costs often hinder their practical adoption. To address this challenge, researchers have begun applying various compression strategies to improve the efficiency of language models for code. These strategies aim to optimize inference latency and memory usage, though often at the cost of reduced model effectiveness. However, there is still a significant gap in understanding how these strategies influence the efficiency and effectiveness of language models for code. Here, we empirically investigate the impact of three well-known compression strategies -- knowledge distillation, quantization, and pruning -- across three different classes of software engineering tasks: vulnerability detection, code summarization, and code search. Our findings reveal that the impact of these strategies varies greatly depending on the task and the specific compression method employed. Practitioners and researchers can use these insights to make informed decisions when selecting the most appropriate compression strategy, balancing both efficiency and effectiveness based on their specific needs.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 36 of its 64 references that are in the map. First posted on arXiv 18 Dec 2024.
Builds on
36 of 64 references.
References · 36
- 2017Attention Is All You Needcited by 60,361
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2016Pruning Filters for Efficient ConvNetscited by 1,143
- 2021A Survey of Quantization Methods for Efficient Neural Network Inferencecited by 815
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2019Green AIcited by 627
24 more
- 2020Up or Down? Adaptive Rounding for Post-Training Quantizationcited by 621
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2018Rethinking the Value of Network Pruningcited by 599
- 2019The State of Sparsity in Deep Neural Networkscited by 476
- 2020Movement Pruning: Adaptive Sparsity by Fine-Tuningcited by 403
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2019Q8BERT: Quantized 8Bit BERTcited by 300
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
- 2016Dynamic Network Surgery for Efficient DNNscited by 233
- 2020Compressing BERT: Studying the Effects of Weight Pruning on Transfer Learningcited by 185
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
- 2020Compressing Large-Scale Transformer-Based Models: A Case Study on BERTcited by 96
- 2024Source Code Summarization in the Era of Large Language Modelscited by 31
- 2022Compressing Pre-trained Models of Code into 3 MBcited by 21
- 2023Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterizationcited by 21
- 2023Greening Large Language Models of Codecited by 19
- 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
- 2020TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Searchcited by 11
- 2024When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inferencecited by 10
- 2023Survey of Code Search Based on Deep Learningcited by 6
- 2023Faster or Slower? Performance Mystery of Python Idioms Unveiled with Empirical Evidencecited by 3
- 2020Quantifying Performance Changes with Effect Size Confidence Intervalscited by 2
- 2024AI-driven Java Performance Testing: Balancing Result Quality with Testing Timecited by 2
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?cited by 1
- 2025SustainDiffusion: Optimising the Social and Environmental Sustainability of Stable Diffusion Modelscited by 0
- 2026Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detectioncited by 0
- 2026Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detection4 May 2026
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?7 Nov 2025
- 2025SustainDiffusion: Optimising the Social and Environmental Sustainability of Stable Diffusion Models21 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2026Compressed code: the hidden effects of quantization and distillation on programming tokens
- 2026UniComp: A Unified Evaluation of Large Language Model Compression via Pruning, Quantization, and Distillation
- 2025Enhancing Large Language Model Efficiencyvia Symbolic Compression: A Formal Approach Towards Interpretability
- 2023The Cost of Compression: Investigating the Impact of Compression on Parametric Knowledge in Language Models
- 2024A Comprehensive Survey of Compression Algorithms for Language Models
- 2025A Systematic Study of Compression Ordering for Large Language Models
- 2026An Empirical Study of Speculative Decoding on Software Engineering Tasks ↗
- 2025Information Capacity: Evaluating the Efficiency of Large Language Models via Text Compression