arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.28576cs.LGcs.DCcs.PF
收藏

大语言模型解码的令牌-能量定律:活动字节与实现时间决定每令牌焦耳数

The Token-Energy Law of LLM Decode: Active Bytes and Realized Time Account for Joules per Token

NVIDIA Corporation(英伟达公司);Texas Tech University(德克萨斯理工大学);Texas Advanced Computing Center(德克萨斯高级计算中心)

Chenxu Niu, Batuhan Sencer, Wei Zhang, Yong Chen

AI总结:

本研究提出令牌-能量定律模型,结合活动字节与实现解码时间,解释大语言模型解码能耗,经实验验证其估计误差不超过3.73%,为高效部署提供依据。

摘要:

大语言模型的高效部署需要理解模型架构、硬件及服务设置如何影响每生成令牌的能耗。我们提出令牌-能量定律,这是一种针对密集全历史解码的GPU板每输出令牌能耗的紧凑可解释模型。它将令牌能耗与两个核心维度关联:活动字节和实现的解码时间。活动字节描述每输出的逻辑字节需求,将解码迭代内共享的密集权重与每个请求需读取和更新的私有键值(KV)历史分离。实现的解码时间是经过的解码时长除以生成的输出令牌数。我们将这两个字节坐标与时间结合为通用仿射形式,系数针对每个模型及硬件/运行时配置校准。该公式解释了批处理如何分摊共享权重工作、更长的注意力历史如何增加私有KV需求,以及吞吐量如何决定与时间相关的每输出成本。我们的实验覆盖了三个模型在NVIDIA Hopper和Blackwell GPU上的BF16解码,包括Hopper上的双GPU张量并行。使用固定系数和观测到的解码时间,保留条件均值能耗估计与测量值的差异最多为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%.

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

↑