Towards Green AI: Decoding the Energy of LLM Inference in Software Development
Not on the map. Why?
Abstract (arXiv)
Context: AI-assisted tools are increasingly integrated into software development workflows, but their reliance on large language models (LLMs) introduces substantial computational and energy costs. Understanding and reducing the energy footprint of LLM inference is therefore essential for sustainable software development. Objective: In this study, we conduct a phase-level analysis of LLM inference energy consumption, distinguishing between the (1) prefill, where the model processes the input and builds internal representations, and (2) decoding, where output tokens are generated using the stored state. Method: We investigate six 6B-7B and four 3B-4B transformer-based models, evaluating them on code-centric benchmarks HumanEval for code generation and LongBench for code understanding. Results: Our findings show that, within both parameter groups, models exhibit distinct energy patterns across phases. Furthermore, we observed that increases in prefill cost amplify the energy cost per token during decoding, with amplifications ranging from 1.3% to 51.8% depending on the model. Lastly, three out of ten models demonstrate babbling behavior, adding excessive content to the output that unnecessarily inflates energy consumption. We implemented babbling suppression for code generation, achieving energy savings ranging from 44% to 89% without affecting generation accuracy. Conclusion: These findings show that prefill costs influence decoding, which dominates energy consumption, and that babbling suppression can yield up to 89% energy savings. Reducing inference energy therefore requires both mitigating babbling behavior and limiting impact of prefill on decoding.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 19 of its 45 references that are in the map. First posted on arXiv 5 Feb 2026.
Builds on
19 of 45 references.
References · 19
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Servingcited by 595
- 2023Splitwise: Efficient generative LLM inference using phase splittingcited by 536
- 2024Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Servecited by 507
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 367
- 2023Power Hungry Processing: Watts Driving the Cost of AI Deployment?cited by 186
- 2023A Systematic Review of Green AIcited by 77
- 2024Towards Greener LLMs: Bringing Energy-Efficiency to the Forefront of LLM Inferencecited by 59
- 2025Energy Considerations of Large Language Model Inference and Efficiency Optimizationscited by 54
- 2024An Empirical Study on Usage and Perceptions of LLMs in a Software Engineering Projectcited by 28
- 2025Characterizing LLM Inference Energy-Performance Tradeoffs across Workloads and GPU Scalingcited by 19
7 more
- 2025AI-Powered, But Power-Hungry? Energy Efficiency of LLM-Generated Codecited by 8
- 2025SPAD: Specialized Prefill and Decode Hardware for Disaggregated LLM Inferencecited by 6
- 2025AI in Software Engineering: Perceived Roles and Their Impact on Adoptioncited by 5
- 2025Generating Energy-Efficient Code via Large-Language Models -- Where are we now?cited by 5
- 2025SENAI: Towards Software Engineering Native Generative Artificial Intelligencecited by 2
- 2025Tu(r)ning AI Green: Exploring Energy Efficiency Cascading with Orthogonal Optimizationscited by 2
- 2025Smart but Costly? Benchmarking LLMs on Functional Accuracy and Energy Efficiencycited by 1
Built on by
Citing papers per year: 2026: 2.
2 papers.