arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.22362cs.LG
收藏

理解效率:在LLM能耗中的量化、批量和服务策略

Understanding Efficiency: Quantization, Batching, and Serving Strategies in LLM Energy Use

Hugging Face

Julien Delavande, Regis Pierrard, Sasha Luccioni

AI总结:

本文研究了LLM推理能耗中的量化、批量和服务策略,发现低精度和批量处理可显著降低能耗,同时强调服务堆栈的协调对可持续部署的重要性。

摘要:

大型语言模型(LLMs)正在越来越多地应用于生产环境,将计算资源和能源需求的负担从训练转移到推理。尽管先前的研究已经考察了每个提示或每个标记的推理能耗,但我们强调系统级设计选择——如数值精度、批量策略和请求调度——如何导致相同模型在能耗上的数量级差异。我们对NVIDIA H100 GPU上的LLM推理能耗和延迟进行了详细的实证研究,分析了量化、批量大小和服务配置(例如使用Hugging Face的文本生成推理服务器)的影响。我们的结果揭示了低精度格式仅在计算受限的环境中才能带来能耗节省;批量处理提高了能效,尤其是在解码等内存受限的阶段;而结构化请求时间(到达整形)可以将单个请求的能耗降低多达100倍。我们认为可持续的LLM部署不仅取决于模型内部,还取决于服务堆栈的协调。我们的发现促使了面向阶段的能耗分析和系统级优化,以实现更环保的AI服务。

英文摘要:

Large Language Models (LLMs) are increasingly deployed in production, contributing towards shifting the burden in terms of computational resources and energy demands from training to inference. While prior work has examined the energy cost of inference per prompt or per token, we highlight how \emph{system-level design choices} - such as numerical precision, batching strategy, and request scheduling - can lead to orders-of-magnitude differences in energy consumption for the same model. We perform a detailed empirical study of LLM inference energy and latency on NVIDIA H100 GPUs, analyzing the impact of quantization, batch size, and serving configuration (e.g., with Hugging Face's Text Generation Inference server). Our results reveal that lower-precision formats only yield energy gains in compute-bound regimes; that batching improves energy efficiency, especially in memory-bound phases like decoding; and that structured request timing (arrival shaping) can reduce per-request energy by up to 100 times. We argue that sustainable LLM deployment depends not only on model internals, but also on the orchestration of the serving stack. Our findings motivate phase-aware energy profiling and system-level optimizations for greener AI services.

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

↑