The Token-Energy Law of LLM Decode: Active Bytes and Realized Time Account for Joules per Token
作者: Chenxu Niu, Batuhan Sencer, Wei Zhang, Yong Chen
分类: cs.LG, cs.DC, cs.PF
发布日期: 2026-10-20
💡 一句话要点
提出Token-Energy法则以优化大语言模型的能效问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 能效优化 大语言模型 Token-Energy法则 GPU能耗 解码时间 活动字节 机器学习
📋 核心要点
- 现有方法在大语言模型的能效优化上缺乏系统性理解,导致能耗高且难以预测。
- 本文提出Token-Energy法则,通过活动字节和实现解码时间两个维度来量化每个token的能耗。
- 实验涵盖三种模型,结果显示使用固定系数和观察到的解码时间,能耗估计与实际测量的差异不超过3.73%。
📝 摘要(中文)
大语言模型的能效部署需要理解模型架构、硬件和服务设置如何影响每个生成token的能耗。本文提出了Token-Energy法则,这是一个紧凑且可解释的模型,用于描述密集全历史解码中每个输出token的GPU能耗。该法则将token能耗与两个核心维度相关联:活动字节和实现解码时间。活动字节描述每个输出的逻辑字节需求,区分在解码迭代中共享的密集权重与每个请求读取和更新的私有键值(KV)历史。实现解码时间是经过的解码持续时间除以生成的输出token数量。通过实验验证,该法则在不同模型和硬件配置下的能耗估计与实际测量的差异最大为3.73%。
🔬 方法详解
问题定义:本文旨在解决大语言模型在解码过程中能耗高的问题,现有方法未能有效量化不同因素对能耗的影响。
核心思路:提出Token-Energy法则,通过将能耗与活动字节和实现解码时间关联,提供一种可解释的能耗模型。这样的设计使得能耗分析更具针对性和实用性。
技术框架:整体框架包括两个主要模块:活动字节计算和实现解码时间测量。活动字节模块负责分析每个输出token的字节需求,而解码时间模块则计算生成token所需的时间。
关键创新:Token-Energy法则是本研究的核心创新,它通过结合活动字节和解码时间,提供了一种新的能耗评估方法,区别于传统的单一维度分析。
关键设计:在实验中,采用了固定系数和观察到的解码时间来校准模型,确保能耗估计的准确性,且在不同硬件配置下进行验证。
🖼️ 关键图片
📊 实验亮点
实验结果表明,使用Token-Energy法则进行能耗估计时,与实际测量的差异最大为3.73%。这一精确度在能效优化中具有重要意义,表明该方法在不同模型和硬件配置下的适用性和有效性。
🎯 应用场景
该研究为大语言模型的能效优化提供了理论基础和实践指导,适用于云计算、边缘计算等多种场景,能够有效降低能耗,提高模型部署的可持续性。未来可能在智能设备和大规模语言处理系统中得到广泛应用。
📄 摘要(原文)
Energy-efficient deployment of large language models requires understanding how model architecture, hardware, and serving settings shape energy per generated token. We introduce the Token-Energy Law, a compact, interpretable model of GPU-board energy per output token for dense, full-history decoding. It relates token energy to two core dimensions: active bytes and realized decode time. Active bytes describe logical byte demand per output, separating dense weights shared within a decode iteration from private key--value (KV) histories read and updated for each request. Realized decode time is the elapsed decode duration divided by the number of output tokens produced. We combine the two byte coordinates and time in a common affine form, with coefficients calibrated for each model and hardware/runtime configuration. This formulation explains how batching amortizes shared-weight work, longer attended histories increase private KV demand, and throughput determines the time-associated cost per output. Our experiments cover three models under BF16 decoding on NVIDIA Hopper and Blackwell GPUs, including two-GPU tensor parallelism on Hopper. Using fixed coefficients and observed decode time, held-out condition-mean energy estimates differ from measurements by at most 3.73%.