Compressing Pre-trained Models of Code into 3 MB
Not on the map. Why?
Abstract (arXiv)
Although large pre-trained models of code have delivered significant advancements in various code processing tasks, there is an impediment to the wide and fluent adoption of these powerful models in software developers' daily workflow: these large models consume hundreds of megabytes of memory and run slowly on personal devices, which causes problems in model deployment and greatly degrades the user experience. It motivates us to propose Compressor, a novel approach that can compress the pre-trained models of code into extremely small models with negligible performance sacrifice. Our proposed method formulates the design of tiny models as simplifying the pre-trained model architecture: searching for a significantly smaller model that follows an architectural design similar to the original pre-trained model. Compressor proposes a genetic algorithm (GA)-based strategy to guide the simplification process. Prior studies found that a model with higher computational cost tends to be more powerful. Inspired by this insight, the GA algorithm is designed to maximize a model's Giga floating-point operations (GFLOPs), an indicator of the model computational cost, to satisfy the constraint of the target model size. Then, we use the knowledge distillation technique to train the small model: unlabelled data is fed into the large model and the outputs are used as labels to train the small model. We evaluate Compressor with two state-of-the-art pre-trained models, i.e., CodeBERT and GraphCodeBERT, on two important tasks, i.e., vulnerability prediction and clone detection. We use our method to compress pre-trained models to a size (3 MB), which is 160× smaller than the original size. The results show that compressed CodeBERT and GraphCodeBERT are 4.31× and 4.15× faster than the original model at inference, respectively. More importantly, ...
Key facts. Cited by 21 papers in the map (data through 14 Oct 2026). First posted on arXiv 15 Aug 2022.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 7; 2024: 5; 2025: 6; 2026: 3.
21 papers.
Sort:
By area:
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2023LLM for SoC Security: A Paradigm Shiftcited by 22
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023Trustworthy and Synergistic Artificial Intelligence for Software Engineering: Vision and Roadmapscited by 19
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2024Towards Agentic Runtime Healingcited by 7
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Taskscited by 5
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
- 2023Modularizing while Training: A New Paradigm for Modularizing DNN Modelscited by 4
- 2025LPASS: Linear Probes as Stepping Stones for vulnerability detection using compressed LLMscited by 4
- 2025"My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistantscited by 4
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
9 more
- 2024Machine Translation Testing via Syntactic Tree Pruningcited by 2
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Taskscited by 2
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?cited by 1
- 2024Efficient DNN-Powered Software with Fair Sparse Modelscited by 0
- 2024Insights into resource utilization of code small language models serving with runtime engines and execution providerscited by 0
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimizationcited by 0
- 2026Carbon-Taxed Transformers: A Green Compression Pipeline for Overgrown Language Modelscited by 0
- 2026Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detectioncited by 0
- 2026Beyond FLOPs: Energy-Aware Knowledge Distillation for Sustainable LLMs on Code-Related Taskcited by 0
- 2026Beyond FLOPs: Energy-Aware Knowledge Distillation for Sustainable LLMs on Code-Related Task18 Aug 2026
- 2026Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detection4 May 2026
- 2026Carbon-Taxed Transformers: A Green Compression Pipeline for Overgrown Language Models28 Apr 2026
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?7 Nov 2025
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Tasks21 Aug 2025
- 2025"My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistants17 Aug 2025
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrieval1 Aug 2025
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimization30 Jul 2025
- 2025LPASS: Linear Probes as Stepping Stones for vulnerability detection using compressed LLMs30 May 2025
- 2024Insights into resource utilization of code small language models serving with runtime engines and execution providers19 Dec 2024
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERT18 Dec 2024
- 2024Towards Agentic Runtime Healing2 Aug 2024
9 more
- 2024Efficient DNN-Powered Software with Fair Sparse Models3 Jul 2024
- 2024Machine Translation Testing via Syntactic Tree Pruning1 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Tasks25 Dec 2023
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023LLM for SoC Security: A Paradigm Shift9 Oct 2023
- 2023Trustworthy and Synergistic Artificial Intelligence for Software Engineering: Vision and Roadmaps8 Sep 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023Modularizing while Training: A New Paradigm for Modularizing DNN Models15 Jun 2023
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Taskscited by 2
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?cited by 1
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimizationcited by 0
- 2026Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detectioncited by 0
- 2026Beyond FLOPs: Energy-Aware Knowledge Distillation for Sustainable LLMs on Code-Related Taskcited by 0
- 2026Beyond FLOPs: Energy-Aware Knowledge Distillation for Sustainable LLMs on Code-Related Task18 Aug 2026
- 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
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Tasks21 Aug 2025
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimization30 Jul 2025
- 2024Towards Agentic Runtime Healingcited by 7
- 2024Towards Agentic Runtime Healing2 Aug 2024
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2023LLM for SoC Security: A Paradigm Shiftcited by 22
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023Trustworthy and Synergistic Artificial Intelligence for Software Engineering: Vision and Roadmapscited by 19
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Taskscited by 5
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
- 2023Modularizing while Training: A New Paradigm for Modularizing DNN Modelscited by 4
- 2025"My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistantscited by 4
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
- 2024Machine Translation Testing via Syntactic Tree Pruningcited by 2
- 2024Efficient DNN-Powered Software with Fair Sparse Modelscited by 0
12 most cited of 14 All 14 (JSON)
- 2026Carbon-Taxed Transformers: A Green Compression Pipeline for Overgrown Language Models28 Apr 2026
- 2025"My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistants17 Aug 2025
- 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrieval1 Aug 2025
- 2024Insights into resource utilization of code small language models serving with runtime engines and execution providers19 Dec 2024
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERT18 Dec 2024
- 2024Efficient DNN-Powered Software with Fair Sparse Models3 Jul 2024
- 2024Machine Translation Testing via Syntactic Tree Pruning1 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Software Engineering Tasks25 Dec 2023
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023LLM for SoC Security: A Paradigm Shift9 Oct 2023
- 2023Trustworthy and Synergistic Artificial Intelligence for Software Engineering: Vision and Roadmaps8 Sep 2023
12 newest of 14 All 14 (JSON)