The SIMPLE Law for Energy Cost of LLM Inference
Organizations: DEI - University of Bologna, Bologna, Italy · DISI - University of Bologna, Bologna, Italy · CINECA, Casalecchio di Reno, Italy
Abstract
Generative AI is billed per token, yet tokens are not equally expensive. Each token enters the KV-cache and raises the cost of those that follow, so energy grows non-linearly along a sequence whose tokens look identical. No analytical model states what a token costs, and the most accurate SOTA model is a fit, not a law: it absorbs architecture into fitted coefficients, requiring per-LLM fitting. We derive closed-form expressions of the computational and memory-access complexity of LLM inference in terms of architectural hyperparameters, covering MHA and GQA, and compare a family of analytical models of increasing granularity. From these, we obtain the SIMPLE Inference Model to Predict LLMs Energy (SIMPLE), a four-parameter law that separates prefill from decode, and decode into KV-cache cost and next-token computation. Over traces of 13 dense LLMs from six families on NVIDIA H100 GPUs, it attains R2 = 0.969 and 11.97% MAPE, 3.1-3.5x below the SOTA, without per-LLM calibration. The SIMPLE law explains as well as predicts: prefill energy grows quadratically with the hidden dimension, so larger LLMs suffer most from long inputs; and more aggressive GQA KV grouping reduces the per-token energy by up to 3x relative to standard MHA. Increasing the reasoning token budget pushes output length beyond the analytically derived energy minimum, driving super-linear energy growth; although accuracy grows with the budget, energy grows faster, so Intelligence per Joule peaks at an intermediate budget and falls by up to 3.14x across a 4.0x reasoning-budget range. Agentic serving raises energy per request by 13.0x relative to non-agentic ones, driven by the growth of both the prefill and the KV-cache terms with input length; while prefix caching removes most of the prefill cost (-93%), the KV-cache term is unaffected, so even a cached agentic request costs 4.8x more.
Figures & tables
| Model | Form | Analytical | LLM-agnostic | Attention-aware |
| Vellaisamy et al., 2026 [ 38 ] | Linear | |||
| Zhan et al., 2026 [ 43 ] | Linear | |||
| Delavande et al., 2026 [ 11 ] | Bilinear | |||
| Wilkins et al., 2025 [ 40 ] | Bilinear | |||
| Oviedo et al., 2026 [ 24 ] | Power-law | |||
| SweetSpot, 2026 [ 26 ] | Quadratic |
| Symbol | Dimension | Description | Symbol | Dimension | Description |
| Scalars | Prefill Phase | ||||
| Number of input tokens | Input | ||||
| Number of output tokens | Query, Output projections | ||||
| Number of query heads | Key, Value projections | ||||
| Number of KV heads | Attention scores | ||||
| Number of layers | Attention output | ||||
| Approach | Model | # coeff. | Energy per token, |
| OPs-centric | Vartziotis et al. [ 36 ] | 6 | |
| FLOPs-MemOPs | 3 | ||
| Prefill-Decode | 5 | ||
| Fine-Grained | 25 | ||
| IO-centric | Zhan et al. [ 43 ] | 5 | |
| SweetSpot [ 26 ] | 6 |
| Name | Size (B) | Attention | ||||
| Llama 3.2 | 1 | GQA | 32 | 1/4 | 2048 | 16 |
| OPT | 1.3 | MHA | 32 | 1 | 2048 | 24 |
| Qwen 2 | 1.5 | GQA | 12 | 1/6 | 1536 | 28 |
| Gemma 2 | 2 | GQA | 8 | 1/2 | 2304 | 26 |
| OPT | 2.7 | MHA | 32 | 1 | 2560 | 32 |
| Llama 3.2 | 3 | GQA | 24 | 1/3 | 3072 | 28 |
| Model | Form | Formulation | MAPE (%) | |
| Vellaisamy et al. [ 38 ] Zhan et al. [ 43 ] | Linear | |||
| Delavande et al. [ 11 ] Wilkins et al. [ 40 ] | Bilinear | |||
| Oviedo et al. [ 24 ] | Power-law | |||
| SweetSpot [ 26 ] | Quadratic | |||
| SIMPLE | Quadratic | \theta_{0}+\theta_{1}\,d^{2}L\,\dfrac{\tau_{\text{in}}}{\tau_{\text{out}}}+\theta_{2}\,d\,L\,R\Big(\tau_{\text{in}}+\dfrac{\tau_{\text{out}}}{2}\Big)+\theta_{3}d\,L\ |
| Reasoning | Acc. | IPJ | ||
| [tok] | [%] | [mJ/tok] | [J] | [%/kJ] |
| Qwen3-1.7B | ||||
| 2048 ( ) | 3.0 ( ) | 43.6 ( ) | 89.3 ( ) | 33.7 ( ) |
| 4063 ( ) | 14.0 ( ) | 73.6 ( ) | 298.9 ( ) | 46.8 ( ) |
| 6978 ( ) | 27.0 ( ) | 117.0 ( ) | 816.5 ( ) | 33.1 ( ) |
| 9510 ( ) | 38.0 ( ) | 154.8 ( ) | 1471.9 ( ) | 25.8 ( ) |
| Term [J] | Non-Agentic K, , | Agentic K, | Agentic Cached K, K |
| Prefill | 88.8 ( ) | 1207.8 ( ) | 88.8 ( ) |
| KV-cache | 43.2 ( ) | 573.8 ( ) | 573.8 ( ) |
| Next-token | 6.1 ( ) | 6.1 ( ) | 6.1 ( ) |
| [J/tok] | 0.56 ( ) | 7.24 ( ) | 2.71 ( ) |
| Total | 138.1 ( ) | 1787.7 ( ) | 668.7 ( ) |
| (+1 tok) | 0.20 ( ) | 2.35 ( ) | 2.35 ( ) |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Coeff. | Estimate | Std. Err. | ||
| SIMPLE | ||||
| FLOPs-MemOPs | ||||
LLM Inference
Large language model inference studies how models generate outputs efficiently, reliably, and securely across hardware and workloads.
See all 304 papers