Prompt engineering and its implications on the energy consumption of Large Language Models

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Rubei, Riccardo, Moussaid, Aicha, di Sipio, Claudio, di Ruscio, Davide
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866915542916399104
author Rubei, Riccardo
Moussaid, Aicha
di Sipio, Claudio
di Ruscio, Davide
author_facet Rubei, Riccardo
Moussaid, Aicha
di Sipio, Claudio
di Ruscio, Davide
contents Reducing the environmental impact of AI-based software systems has become critical. The intensive use of large language models (LLMs) in software engineering poses severe challenges regarding computational resources, data centers, and carbon emissions. In this paper, we investigate how prompt engineering techniques (PETs) can impact the carbon emission of the Llama 3 model for the code generation task. We experimented with the CodeXGLUE benchmark to evaluate both energy consumption and the accuracy of the generated code using an isolated testing environment. Our initial results show that the energy consumption of LLMs can be reduced by using specific tags that distinguish different prompt parts. Even though a more in-depth evaluation is needed to confirm our findings, this work suggests that prompt engineering can reduce LLMs' energy consumption during the inference phase without compromising performance, paving the way for further investigations.
format Preprint
id arxiv_https___arxiv_org_abs_2501_05899
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Prompt engineering and its implications on the energy consumption of Large Language Models
Rubei, Riccardo
Moussaid, Aicha
di Sipio, Claudio
di Ruscio, Davide
Software Engineering
Reducing the environmental impact of AI-based software systems has become critical. The intensive use of large language models (LLMs) in software engineering poses severe challenges regarding computational resources, data centers, and carbon emissions. In this paper, we investigate how prompt engineering techniques (PETs) can impact the carbon emission of the Llama 3 model for the code generation task. We experimented with the CodeXGLUE benchmark to evaluate both energy consumption and the accuracy of the generated code using an isolated testing environment. Our initial results show that the energy consumption of LLMs can be reduced by using specific tags that distinguish different prompt parts. Even though a more in-depth evaluation is needed to confirm our findings, this work suggests that prompt engineering can reduce LLMs' energy consumption during the inference phase without compromising performance, paving the way for further investigations.
title Prompt engineering and its implications on the energy consumption of Large Language Models
topic Software Engineering
url https://arxiv.org/abs/2501.05899