arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2501.05899cs.SE
收藏

提示工程及其对大型语言模型能耗的影响

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

Riccardo Rubei, Aicha Moussaid, Claudio di Sipio, Davide di Ruscio

AI总结:

本研究探讨提示工程技术对Llama 3模型代码生成任务碳排放的影响,通过CodeXGLUE基准实验发现,使用特定标签可降低能耗且不损性能。

摘要:

减少基于人工智能的软件系统对环境的影响已变得至关重要。在软件工程中,大型语言模型(LLM)的密集使用在计算资源、数据中心和碳排放方面带来了严峻挑战。在本文中,我们研究了提示工程技术(PETs)如何影响Llama 3模型在代码生成任务中的碳排放。我们使用CodeXGLUE基准进行了实验,在隔离的测试环境中评估了能耗和生成代码的准确性。我们的初步结果表明,通过使用区分不同提示部分的特定标签,可以降低LLM的能耗。尽管需要更深入的评估来确认我们的发现,但这项工作表明,提示工程可以在不影响性能的情况下减少LLM在推理阶段的能耗,为进一步的研究铺平了道路。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑