How Do Prompt Variations Affect Energy Consumption in On-Device LLMs?

How Do Prompt Variations Affect Energy Consumption in On-Device LLMs?

提示词变体如何影响端侧大模型的能耗?

Large language models (LLMs) are increasingly deployed on mobile devices, making energy efficiency a key deployment constraint, yet the energy impact of prompt design remains underexplored. 随着大语言模型(LLM)越来越多地部署在移动设备上,能效已成为部署的关键制约因素,然而提示词设计对能耗的影响仍未得到充分研究。

This paper aims to understand how two prompt properties, cognitive load and phrasing pattern, shape the energy behavior of on-device LLM inference. 本文旨在探讨提示词的两个属性——认知负荷(cognitive load)和措辞模式(phrasing pattern)——如何影响端侧大模型推理的能耗表现。

We conduct a broad empirical study covering prompt properties, datasets, models, and devices, with phase-level profiling that separates prefill and decode energy. 我们开展了一项广泛的实证研究,涵盖了提示词属性、数据集、模型和设备,并通过阶段级分析将预填充(prefill)和解码(decode)阶段的能耗进行了区分。

We find that cognitive load primarily affects the energy cost per token, while phrasing pattern affects energy largely through token usage. 研究发现,认知负荷主要影响每个 Token 的能耗成本,而措辞模式则主要通过影响 Token 的使用量来改变能耗。

Our energy-quality analysis further shows that prompt design reshapes the attainable frontier differently across models, highlighting the need for model-aware prompt design in energy-efficient on-device LLM inference. 我们的能效-质量分析进一步表明,提示词设计在不同模型中对性能边界的重塑方式各不相同,这凸显了在实现端侧大模型高效推理时,进行“模型感知型”提示词设计的必要性。

Code, datasets, and scripts are available at this https URL. 代码、数据集和脚本可在该链接获取。