From Tokens to Watt-hours: Analytical Energy Estimation for LLM Inference on Modern GPUs
作者: Tina Vartziotis, Rodopi Kosteli, Elli Vartziotis, George Dasoulas, Michael Keckeisen, Konstantinos Skianis, Sotirios Kotsopoulos, Francesca Dominici
分类: cs.LG, cs.SE
发布日期: 2026-07-29
备注: 20 pages, 3 figures, 6 tables. Accepted for oral presentation at the GREEN-AI Workshop, co-located with ECML-PKDD 2026
💡 一句话要点
提出一种分析性能量估算方法以优化LLM推理能耗
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 能耗估算 大型语言模型 GPU推理 绿色编码 可持续性分析
📋 核心要点
- 现有方法在推理能耗测量上依赖硬件监测,限制了其在不同系统间的比较和早期设计阶段的应用。
- 论文提出了一种基于GPU的分析性能量估算方法,结合FLOP计算和内存流量因子,避免了直接测量的需求。
- 通过对能耗进行细分,研究表明该方法在模型比较和绿色编码分析中具有良好的适用性和透明性。
📝 摘要(中文)
大型语言模型(LLM)推理的能耗正日益成为部署AI系统环境足迹的重要组成部分。然而,直接测量推理能耗通常需要硬件遥测、电力仪器或特定基础设施监测,限制了其在比较研究、早期系统设计和可持续性报告中的适用性。本文提出了一种经过经验校准的GPU级方法,能够在不进行直接运行时测量的情况下,估算NVIDIA H100级加速器上的LLM推理能耗。该估算器结合了参数缩放的变换器FLOP计算、校准的内存流量因子和硬件特定的FP16/BF16张量核心计算及高带宽内存移动的能量系数。该方法明确区分了提示预填充和自回归解码,使得能够对输入令牌、输出令牌和完整推理请求进行能量估算。
🔬 方法详解
问题定义:本文旨在解决大型语言模型推理能耗测量的局限性,现有方法依赖于复杂的硬件监测,难以在不同环境中进行有效比较。
核心思路:提出了一种分析性的方法,通过结合FLOP计算和内存流量因子,能够在不依赖直接测量的情况下估算能耗,从而提高了方法的适用性和灵活性。
技术框架:该方法的整体架构包括参数缩放的FLOP计算、内存流量因子的校准和硬件特定的能量系数,分为输入令牌、输出令牌和完整推理请求的能量估算模块。
关键创新:最重要的创新在于将推理过程中的能耗细分为计算、参数访问、键值缓存写入和注意力读取等多个组件,允许对模型规模、上下文长度和生成令牌数量的缩放行为进行深入分析。
关键设计:在设计中,采用了FP16/BF16张量核心计算的能量系数,并对内存流量进行了校准,以确保能量估算的准确性和可靠性。该方法强调透明性和可重复性,适合于模型比较和设计阶段的评估。
🖼️ 关键图片
📊 实验亮点
实验结果表明,所提出的方法能够有效估算LLM推理的能耗,且与传统的直接测量方法相比,提供了更高的灵活性和适用性。具体而言,该方法在不同模型规模和上下文长度下的能耗估算与实际测量结果具有良好的一致性,提升了能耗分析的准确性。
🎯 应用场景
该研究的潜在应用领域包括AI系统的能耗优化、绿色编码分析和大型语言模型的设计评估。通过提供透明和可重复的能量估算,研究者和工程师能够在设计阶段做出更可持续的决策,从而降低AI系统的环境影响。
📄 摘要(原文)
The operational energy consumption of large language model (LLM) inference is becoming an increasingly important component of the environmental footprint of deployed AI systems. However, direct measurement of inference energy often requires hardware telemetry, power instrumentation, or infrastructure-specific monitoring, limiting its applicability in comparative studies, early-stage system design, and sustainability reporting. This report presents an analytically structured, empirically calibrated, GPU-level methodology for estimating LLM inference energy on NVIDIA H100-class accelerators without direct runtime measurement. The proposed estimator combines parameter-scaled transformer FLOP accounting, calibrated memory-traffic factors, and hardware-specific energy coefficients for FP16/BF16 tensor-core computation and high-bandwidth-memory movement. It explicitly separates prompt prefill from autoregressive decoding, enabling energy estimates for input tokens, output tokens, and complete inference requests. The methodology further decomposes total energy into compute, parameter-access, key-value-cache write, and attention-read components, allowing the scaling behavior with model size, context length, and generated-token count to be analyzed. The resulting estimates are not intended to replace physical power measurements; rather, they provide transparent, reproducible, and assumption-explicit approximations suitable for model comparison, green-coding analysis, and design-time evaluation of LLM inference workloads.