For best experience please turn on javascript and use a modern browser!
You are using a browser that is no longer supported by Microsoft. Please upgrade your browser. The site may not present itself correctly if you continue browsing.
Using large language models such as ChatGPT is popular, but the energy consumption of these models is becoming a problem. As generative AI can be used in various phases of software development, from design, to implementation, to testing and maintenance, a team of researchers of the Informatics Institute have investigated different techniques that could lead to reduced energy use.
Shutterstock CoSveta

Large Language Models (LLMs) are immensely popular since the launch of ChatGPT in 2022. People use it for a wide variety of purposes: writing emails or even complete novels, making PowerPoint presentations, finding information or consulting it for personal questions. The energy consumption of both training and interacting with LLMs is however staggering.  

Reducing energy

Another increasingly popular user group of LLMs are software developers. When writing code, LLMs can predict the next steps and suggest pieces of code. This can help the developers save a lot of time but also consumes energy. Ana Oprescu, assistant professor in the Complex Cyber Infrastructure (CCI) research group, Pepijn de Reus, graduate of the Artificial Intelligence Master's programme, and Tom Cappendijk, Master's student in the Artificial Intelligence Master's programme, have been working on energy-efficient generation of energy-efficient source code. “I like the theme of energy efficiency”, says Oprescu. “It speaks to people who are affectively oriented because of the environmental consequences, but it also speaks to pragmatically oriented people who want to save on their energy bill or have to stay within the grid capacity constraints.”  

Many people have already pointed out how tricky it is to blindly trust an LLM. So explainability, where the model can guide you through the process of how it came to a decision, is important. Ana Oprescu

Inspired by topics covered in the Erasmus+ project SusTrainable, Oprescu also studies the energy cost and accuracy impact of privacy enhancing techniques. De Reus wanted to write his Bachelor's thesis on a societal topic and came across Oprescu’s work on the energy cost of privacy. Their collaboration led to an ICT4S paper on the impact of privacy-enhancing techniques on energy consumption and accuracy. De Reus: “For my Master's thesis I wanted to do something with energy consumption again, but then ChatGPT was suddenly there. With ChatGPT’s huge popularity comes a huge energy demand as well. So, for my Master's thesis I wanted to see if we can reduce the energy cost of these LLMs.”

This research on energy-efficient generation of energy-efficient code has resulted in a paper presented by Cappendijk  at a conference about applying prompt modifications using prompts to make LLMs generate energy-efficient code. This was followed by a second paper about about applying prompt modifications to make LLMs generate energy-efficient code at GREENS’25. Both presentations were concluded with an engaging discussion.

Prompt modification 

One approach that the researchers applied to try to make the LLM-generated code perform more energy efficient, was by prompt modification. Can you alter the query you send to the LLM, so it would produce more energy efficient code for you? This is what Cappendijk investigated in his Bachelor's Informatica graduation project. His supervisor De Reus: “Simply asking the model to give the most efficient solution did not work. So, we also gave a hint: give the most energy efficient solution, for instance use a ‘for loop’ instead of a ‘while loop’ (a control flow structure in programming). In most of the cases the code LLM didn’t get it right. There was even an example where the for loop-prompt led to a 465.5% energy increase compared to the initial solution.” Therefore, at this moment, prompting for energy efficient code is not an immediately suitable approach. 

In their second paper, the researchers investigated reducing the energy consumption of the code LLM itself. Many of the largest models developed by the big tech companies have undisclosed architectures and are simply too big in size to be developed by academics. But there are smaller, open-source models that can be modified. The researchers hence investigated whether adjusting the parameters (from 32 to 8 bits) or removing layers (with a technique called ‘pruning’) can increase the energy efficiency of the code model. De Reus: “Especially the use of more advanced pruning techniques, in which you carefully select layers to be removed, looks promising.” In January 2025 DeepSeek-R1 was released as open-source, revolutionizing the LLM development paradigm because state-of-the-art models are seldomly published open-source. Cappendijk is extending earlier work by performing energy measurement on DeepSeek-R1 as well. 

Ana Oprescu

Pareto fronts 

Despite of already having two publications in his name before graduating, De Reus hopes to expand his career outside of the academic world. Oprescu would like to continue working on energy efficiency. One of her PhD students is looking into energy-efficient secure neural network inference, a mechanism ensuring that sensitive data remains secret. With her new PhD student, she is now investigating the energy cost of explainability in LLMs. “Many people have already pointed out how tricky it is to blindly trust an LLM. So explainability, where the model can guide you through the process of how it came to a decision, is important. Some architectures are apparently easier to allow for that than others. Are those architectures also by default more energy-efficient? And does this explainability affect the accuracy of the model?” Dilemmas with a trade-off between options, such as energy efficiency, explicability, privacy, accuracy, also referred to as Pareto fronts, have always fascinated Oprescu. “I’m keen on identifying and solving problems where no one solution is best. It is something that has occupied my mind ever since I was a child.”