Greening Large Language Models of Code
Not on the map. Why?
Abstract (arXiv)
Large language models of code have shown remarkable effectiveness across various software engineering tasks. Despite the availability of many cloud services built upon these powerful models, there remain several scenarios where developers cannot take full advantage of them, stemming from factors such as restricted or unreliable internet access, institutional privacy policies that prohibit external transmission of code to third-party vendors, and more. Therefore, developing a compact, efficient, and yet energy-saving model for deployment on developers' devices becomes essential. To this aim, we propose Avatar, a novel approach that crafts a deployable model from a large language model of code by optimizing it in terms of model size, inference latency, energy consumption, and carbon footprint while maintaining a comparable level of effectiveness. The key idea of Avatar is to formulate the optimization of language models as a multi-objective configuration tuning problem and solve it with the help of a Satisfiability Modulo Theories (SMT) solver and a tailored optimization algorithm. The SMT solver is used to form an appropriate configuration space, while the optimization algorithm identifies the Pareto-optimal set of configurations for training the optimized models using knowledge distillation. We evaluate Avatar with two popular language models of code, i.e., CodeBERT and GraphCodeBERT, on two popular tasks, i.e., vulnerability prediction and clone detection. We use Avatar to produce optimized models with a small size (3 MB), which is 160× smaller than the original large models. On the two tasks, the optimized models significantly reduce the energy consumption (up to 184× less), carbon footprint (up to 157× less), and inference latency (up to 76× faster), with only a negligible loss in effectiveness (1.67% on average).
Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). First posted on arXiv 8 Sep 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 3; 2025: 11; 2026: 5.
19 papers.
Sort:
By area:
- 2025Sustainable LLM Inference for Edge AI: Evaluating Quantized LLMs for Energy Efficiency, Output Accuracy, and Inference Latencycited by 32
- 2025How Developers Interact with AI: A Taxonomy of Human-AI Collaboration in Software Engineeringcited by 14
- 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Modelscited by 8
- 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
- 2024CodeCipher: Learning to Obfuscate Source Code Against LLMscited by 3
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
- 2025Optimizing Large Language Models: Metrics, Energy Efficiency, and Case Study Insightscited by 3
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Taskscited by 2
- 2025FairSense-AI: Responsible AI Meets Sustainabilitycited by 1
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?cited by 1
- 2024Insights into resource utilization of code small language models serving with runtime engines and execution providerscited by 0
7 more
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimizationcited by 0
- 2025Evaluating Useful Surrogate Models for Configuration Tuning Beyond Accuracy: A Fitness Landscape Analysis Perspectivecited 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
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generationcited by 0
- 2026FLOPs vs Real Work: The Importance of Replication in AI Efficiency Assessmentcited 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
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generation15 Jul 2026
- 2026Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detection4 May 2026
- 2026FLOPs vs Real Work: The Importance of Replication in AI Efficiency Assessment30 Apr 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
- 2025Evaluating Useful Surrogate Models for Configuration Tuning Beyond Accuracy: A Fitness Landscape Analysis Perspective26 Sep 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
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimization30 Jul 2025
- 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Models30 Jul 2025
- 2025LPASS: Linear Probes as Stepping Stones for vulnerability detection using compressed LLMs30 May 2025
7 more
- 2025Optimizing Large Language Models: Metrics, Energy Efficiency, and Case Study Insights7 Apr 2025
- 2025Sustainable LLM Inference for Edge AI: Evaluating Quantized LLMs for Energy Efficiency, Output Accuracy, and Inference Latency4 Apr 2025
- 2025FairSense-AI: Responsible AI Meets Sustainability4 Mar 2025
- 2025How Developers Interact with AI: A Taxonomy of Human-AI Collaboration in Software Engineering15 Jan 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
- 2024CodeCipher: Learning to Obfuscate Source Code Against LLMs8 Oct 2024
- 2025FairSense-AI: Responsible AI Meets Sustainabilitycited by 1
- 2025FairSense-AI: Responsible AI Meets Sustainability4 Mar 2025
- 2025Sustainable LLM Inference for Edge AI: Evaluating Quantized LLMs for Energy Efficiency, Output Accuracy, and Inference Latencycited by 32
- 2025How Developers Interact with AI: A Taxonomy of Human-AI Collaboration in Software Engineeringcited by 14
- 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Modelscited by 8
- 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
- 2024CodeCipher: Learning to Obfuscate Source Code Against LLMscited by 3
- 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
- 2025Optimizing Large Language Models: Metrics, Energy Efficiency, and Case Study Insightscited by 3
- 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
- 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
12 most cited of 18 All 18 (JSON)
- 2026Beyond FLOPs: Energy-Aware Knowledge Distillation for Sustainable LLMs on Code-Related Task18 Aug 2026
- 2026Quantize with Confidence? An Empirical Study of Quantization for Code Generation15 Jul 2026
- 2026Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detection4 May 2026
- 2026FLOPs vs Real Work: The Importance of Replication in AI Efficiency Assessment30 Apr 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
- 2025Evaluating Useful Surrogate Models for Configuration Tuning Beyond Accuracy: A Fitness Landscape Analysis Perspective26 Sep 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
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimization30 Jul 2025
- 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Models30 Jul 2025
- 2025LPASS: Linear Probes as Stepping Stones for vulnerability detection using compressed LLMs30 May 2025
12 newest of 18 All 18 (JSON)