TL;DR
This paper introduces a semi-analytical, empirically calibrated framework to estimate the GPU energy consumption of Large Language Model (LLM) inference without requiring physical power meters. By breaking down energy costs into tensor-core compute and high-bandwidth memory (HBM) traffic across both prefill and decoding phases, the model provides a transparent way to evaluate the sustainability of AI workloads at design time.
What Problem Does This Paper Address?
As LLMs scale to millions of users, the cumulative energy cost of running inference continuously has become a major environmental and financial concern. However, measuring this energy directly is notoriously difficult—it typically requires specialized hardware telemetry, root access to infrastructure, or proprietary monitoring tools. This lack of accessibility creates a barrier for researchers and green-coding engineers who want to compare model efficiencies or optimize deployments before renting expensive hardware.
While prior work has established scaling laws for computational complexity (FLOPs), they often ignore the massive energy cost of moving data through memory. This paper bridges the gap by providing an open, reproducible formula that translates token counts and model architectures directly into Watt-hours.
Methods
The authors develop a semi-analytical estimator tailored for NVIDIA H100-class GPUs. The core equation splits total energy into two primary drivers: $$\text{E}_{\text{GPU}} = \text{E}_{\text{compute}} + \text{E}_{\text{memory}}$$
- Compute Energy: Proportional to the number of floating-point operations (FLOPs) processed by the GPU's tensor cores, using standard transformer scaling constants ($6N$ FLOPs per token, where $N$ is the parameter count) plus context-length attention corrections.
- Memory Energy: Proportional to the number of bits transferred through High-Bandwidth Memory (HBM). The authors uniquely decompose this traffic into three distinct streams: parameter access, key-value (KV) cache writes, and attention-related KV cache reads.
Crucially, the methodology separates the prompt prefill phase (which is compute-bound) from the autoregressive decode phase (which is memory-bound). To make the analytical equations match real-world hardware behavior, they introduce three empirical calibration factors ($\gamma$, $s_{\text{attn}}$, and $\eta$) that account for hardware inefficiencies, caching behavior, and memory bandwidth saturation. They also offer a "simplified parameter-only" version for when exact architectural details (like layer counts or hidden dimensions) are unknown.
Datasets
As this is an analytical modeling paper, it does not train a new AI model. Instead, the authors evaluate their estimator across a diverse inventory of 16 distinct transformer-based architectures spanning from small embedding models to massive LLMs (including EmbeddingGemma, Qwen3, Granite 3.3, DeepSeek-R1, and LLaMA 3.3 70B).
To calibrate and validate their equations, they utilize empirical, measurement-based inference energy data from a prominent prior study by Caravaca et al. (2025).
Key Insights and Ideas
- The Quadratic Wall of Attention: While compute and KV-cache write costs scale linearly with the number of generated tokens, attention-related KV-cache reads scale quadratically. As a result, for long generation sequences, memory movement completely overtakes compute as the dominant energy sink.
- Architecture Trumps Raw Size: Energy scaling is not perfectly monotonic with parameter count. Two models with similar parameter sizes can exhibit noticeably different energy profiles because memory traffic is highly sensitive to specific architectural choices, such as the ratio between the hidden dimension ($d_{\text{model}}$) and the number of layers ($n_{\ell}$).
- Phase Separation is Mandatory: Because the prefill phase processes all input tokens simultaneously, it achieves high hardware utilization. The decoding phase processes tokens one by one, leading to low compute utilization and high memory-bandwidth pressure, meaning an input token and an output token have fundamentally different energy costs.
Key Results
- High Validation Accuracy: When compared against physical hardware measurements, the analytical estimator achieved a relative error rate between 5% and 27%. The highest accuracy was achieved on the 70B parameter model, where the estimate deviated from reality by a mere 4.73%.
- Token-Level Benchmarks: Under the simplified compute-dominated model, the authors mapped out clear per-token energy costs. For instance, a sub-billion parameter embedding model consumes less than 2.3 mJ per input token, whereas the massive GPT-OSS (120B) requires 374.4 mJ per output token and 449.3 mJ per input token.
Limitations and Future Work
The primary limitation is that the estimator is strictly accelerator-side. It models only the GPU's internal compute and memory energy, completely excluding system-level overheads like CPU execution, host memory access, networking, and datacenter cooling (PUE).
Additionally, the current mathematical formulation abstracts away several modern architectural optimizations, such as Grouped-Query Attention (GQA), Mixture-of-Experts (MoE) routing, and quantization schemes (e.g., INT4/INT8 weights). The authors note that future iterations of the tool will aim to integrate these advanced serving techniques and account for multi-GPU tensor-parallel execution.
Summary updated