Green Prompting: Characterizing Prompt-driven Energy Costs of LLM Inference

Marta Adamska 1 , Daria Smirnova 1 , Hamid Nasiri 1 , Zhengxin Yu 1 , and Peter Garraghan 1 · 2025

Read Green Prompting: Characterizing Prompt-driven Energy Costs of LLM Inference by Marta Adamska 1 , Daria Smirnova 1 , Hamid Nasiri 1 , Zhengxin Yu 1 , and Peter Garraghan 1 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-10666.txt.

Introduction

Marta Adamska and co-authors published this computing study in 2025 on the energy cost of running large language models. Inference, answering each prompt, is where the ongoing cost lies, and prompt design is a lever users control. The team measured energy use across three open models and three task types: question answering, sentiment analysis, and text generation. For every run they logged prompt and response traits alongside the energy drawn.

Identical tasks could draw quite different energy depending on how the model answered. Prompt length mattered less than the meaning of the task itself. Certain keywords were tied to higher or lower energy use, and those keywords differed by task. The authors conclude that the semantics of a prompt drive inference cost in ways users can exploit. They frame the work as a step toward energy-adaptive models that adjust their effort to the job.

Catalog record

CREATORMarta Adamska 1 , Daria Smirnova 1 , Hamid Nasiri 1 , Zhengxin Yu 1 , and Peter Garraghan 1
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE39 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-10666

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Green Prompting: Characterizing Prompt-driven Energy Costs of LLM Inference Marta Adamska 1 , Daria Smirnova 1 , Hamid Nasiri 1 , Zhengxin Yu 1 , and Peter Garraghan 1 Abstract Large Language Models (LLMs) have become widely used across various domains spanning search engines, code generation, and text creation. However, the high cost of inference is a major concern associated with their adoption, as it impacts both their financial feasibility and, more importantly, sustainability. In this study, we empirically examine how different prompt and response characteristics impact LLM inference energy cost. We conduct experiments leveraging three open-source transformer-based LLMs across three task types–question answering, sentiment analysis, and text generation. For each inference, we analyzed prompt and response characteristics (length, semantic meaning, latency, energy consumption). Our results demonstrate that even when presented with identical tasks, models generate responses with varying characteristics and subsequently exhibit distinct energy consumption patterns. We found that prompt length is less significant than the semantic meaning of the task itself. In addition, we identified specific keywords associated with higher or lower energy usage that vary between associated tasks, with certain keywords seeing up to 60% energy reduction. These findings highlight the importance of prompt design in optimizing inference efficiency. We conclude that the semantic meaning of prompts and certain task-related keywords significantly impact inference costs, leading the way for deeper exploration towards sustainable LLM operation. I Introduction Transformer models have revolutionized the AI landscape by enabling faster and more accurate predictions through their innovative use of self-attention mechanisms [ 1 ] . The transformer architecture serves as the underlying architecture for most modern Large Language Models (LLMs) and, unlike traditional neural networks, they overcome key limitations by making use of multiple attention mechanisms and processing large datasets, which allows to efficiently capture complex relationships within data. This architecture allows the use of LLMs for linguistic tasks ranging from medical applications [ 2 ] , search engines [ 3 ] , to enhanced code development [ 4 , 5 ] . Although the versatility and adoption of LLMs can provide benefits, their widespread use raises significant concerns, particularly regarding energy consumption and environmental impact. The carbon footprint and energy usage of an LLM life cycle vary greatly depending on factors such as the geographical location of the data centers and the hardware on which they run [ 6 ] . Despite that, the growing demand for more complex and large-scale deployments suggests that the demand for energy for AI systems will grow [ 7 ] . There has been a lot of attention paid to the AI training cost. For example, BLOOM – a 176B parameter model – consumed 433,196 kWh [ 8 ] . Another large energy consumer is inference, which uses the trained model to generate outputs from previously unseen data inputs. For comparison, it is estimated that the energy needed for a single inference for BLOOM was on average 3.96 Wh. Although the energy cost of individual inference is small, the inference stage can make up to 65% [ 9 ] of the carbon footprint of an AI model’s life cycle due to billions of inference calls, responsible for significant energy costs. Previous studies examine different factors contributing to LLM energy consumption during inference across model architecture, hardware accelerators [ 10 , 11 ] , parallelism and batching [ 12 , 13 ] , and workload types [ 14 , 15 ] . Less attention has been given to how prompts and their characteristics impact the energy usage of LLM inference. Prompt engineering, the practice of designing prompts to achieve the desired output, has primarily been used to achieve the best possible accuracy [ 16 , 17 , 18 ] . However, the role of prompt optimization in reducing energy consumption of the LLMs remains an open question [ 19 , 8 ] . While various approaches have been explored to address the challenge of energy consumption during LLM inference, the potential of prompt engineering, different qualities of prompts and responses, in this context remain largely unexplored. To identify the patterns behind energy usage, it is crucial to analyze the impact of different prompt characteristics and determine the key drivers of energy consumption. This issue is particularly significant as prompt characteristics can vary widely within LLM-based systems. In this paper, we present an empirical study of LLMs to understand their inference energy usage. The studied models are based on transformer architecture and are similar in parameter size; some of the differentiating qualities include vocabulary size, number of hidden layers and training data. In order to understand the energy patterns in those models, we ran multiple prompts with different qualities, multiple tasks, and changing hyperparameters. Each model received the same set of prompts with the same hyperparameter settings. Energy usage and time taken to respond (latency) were measured during each of the inference runs. The results provided insight into which features impact energy consumption. Our findings demonstrated that the length of the response generated by the LLM is a major driver of energy consumption. Experiments also suggest that response correctness does not significantly influence the energy consumption. All results are discussed in Section V . This insight opens the door to understanding LLM inference and, consequently, to contributing to more sustainable AI and ML system practices. Fig. 1 : Diagram of measurement system designed to conduct the experiments. The main contributions of this research are: • Experimental System : We present a measurement system for capturing energy consumption during one-shot LLM inference operations. This system enables systematic, reproducible energy profiling across diverse production-representative workloads. • Response Characteristic Analysis : We analyze generated outputs, quantifying characteristics including token-level response length. Our results demonstrate that response length exhibits a stronger correlation with energy consumption than input prompt length. • Task and Semantic Impact Analysis : We demonstrate that task type and prompt semantics significantly influence response generation behavior and consequently the energy consumption. Through systematic experimentation, we establish direct relationships between task complexity and energy utilization. We further investigate how specific prompt tokens affect system response characteristics. • Energy Reduction Based on Keywords : We determine that for certain tasks using specific keywords can introduce energy reduction, with some instances reaching 50% and 60%. The remainder of this paper is structured as follows. Section II reviews the related work. Details of the experiment are introduced in Section III , while the experiment setup is described in Section IV . Experimental results are given in Section V . Discussion can be found in Section VI , which is then followed by Section VII , describing the limitations of this study. Finally, Section VIII concludes this paper. II Related work In recent years, deep neural networks (DNNs) have shown remarkable capabilities across a range of tasks and have attracted broad attention from researchers. Research and development of these networks require significant computational resources, leading to a considerable energy demand. Therefore, designing energy-efficient DNNs deployed in systems is necessary. Strubell et al. [ 20 ] quantified the approximate financial and environmental costs of training various LLMs. In the publication, they introduced an approach to compute the total energy consumption of a model by adding up the power consumption of the GPU,

Read the complete text