Saved in:
Bibliographic Details
Main Authors: Adamska, Marta, Smirnova, Daria, Nasiri, Hamid, Yu, Zhengxin, Garraghan, Peter
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2503.10666
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917437924966400
author Adamska, Marta
Smirnova, Daria
Nasiri, Hamid
Yu, Zhengxin
Garraghan, Peter
author_facet Adamska, Marta
Smirnova, Daria
Nasiri, Hamid
Yu, Zhengxin
Garraghan, Peter
contents Large Language Models (LLMs) have become widely used across various domains spanning search engines, code generation, and text creation. However, a major concern associated with their adoption is the high cost of inference, impacting both their sustainability and financial feasibility. In this study, we empirically study how different prompt and response characteristics directly 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, time taken, 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. 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 creating energy-adaptive LLMs.
format Preprint
id arxiv_https___arxiv_org_abs_2503_10666
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Green Prompting: Characterizing Prompt-driven Energy Costs of LLM Inference
Adamska, Marta
Smirnova, Daria
Nasiri, Hamid
Yu, Zhengxin
Garraghan, Peter
Computation and Language
Artificial Intelligence
Machine Learning
Large Language Models (LLMs) have become widely used across various domains spanning search engines, code generation, and text creation. However, a major concern associated with their adoption is the high cost of inference, impacting both their sustainability and financial feasibility. In this study, we empirically study how different prompt and response characteristics directly 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, time taken, 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. 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 creating energy-adaptive LLMs.
title Green Prompting: Characterizing Prompt-driven Energy Costs of LLM Inference
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2503.10666