The SIMPLE Law for Energy Cost of LLM Inference

Hiari Pizzini Cavagna, Andrea Proia, Daniele Cesarini, Zeynep Kiziltan, Andrea BartoliniarXiv 2026

TL;DR

The SIMPLE Law is a new analytical framework that predicts the energy cost of LLM inference using just four architectural hyperparameters. Unlike previous models that require custom calibration for every new LLM, SIMPLE generalizes across different model families and attention mechanisms (like GQA), reducing prediction error by over 3x compared to current state-of-the-art methods.

What Problem Does This Paper Address?

As LLMs move from training labs to continuous production, inference now accounts for up to 90% of their total lifecycle energy. However, we lack a fundamental "law" to explain what a token actually costs.

Currently, the industry treats tokens as a flat currency, but they aren't created equal. Each new token generated must attend to all previous tokens in the "KV-cache," meaning the energy cost grows non-linearly as a sequence lengthens. Existing energy models are mostly empirical "fits"—they work for a specific model they've already measured but fail to predict the cost of a new architecture or a different attention mechanism like Grouped-Query Attention (GQA). The authors aim to bridge this gap with a physics-like law derived from the first principles of transformer computation.

Methods

The authors derived closed-form expressions for the computational (FLOPs) and memory-access (MemOPs) complexity of decoder-only Transformers. They specifically extended these derivations to account for Grouped-Query Attention (GQA), a standard feature in modern models like Llama 3 and Qwen that reduces memory traffic.

By simplifying these complex equations and performing term ablations, they arrived at the SIMPLE (SIMPLE Inference Model to Predict LLMs Energy) law. The model decomposes energy-per-token ($E_{tok}$) into three interpretable components:

  1. Prefill Amortization: The fixed cost of processing the input prompt, spread over the output tokens.
  2. KV-cache Cost: The linear growth in energy as the model reads an ever-expanding context.
  3. Next-token Computation: The constant cost of the feed-forward networks (FFN) for each new token.

The resulting formula (seen in Figure 3) uses only four coefficients ($\theta_0$ to $\theta_3$) and four architectural parameters: hidden dimension ($d$), number of layers ($L$), KV-to-query head ratio ($R$), and sequence lengths ($\tau_{in}, \tau_{out}$).

Table 3 Summary of the proposed energy models and selected baselines for predicting the energy per generated token, 𝐸tok. SweetSpot is included for direct comparison. For the LLM-agnostic SweetSpot model, 𝜙0, … , 𝜙5 denote architecture-dependent analytical coefficients, whose explicit expressions are given in Equation 20.

Datasets

The model was validated using a large, publicly available dataset of energy measurements from NVIDIA H100 GPUs. The dataset includes traces from 13 dense LLMs across six families:

  • OPT (1.3B, 2.7B, 6.7B)
  • LLaMA (3.1-8B, 3.2-1B, 3.2-3B)
  • Gemma 2 (2B, 9B)
  • Falcon (7B)
  • Qwen 2 (1.5B, 7B)
  • Granite (3B, 8B)

These models cover a wide range of attention configurations, from standard Multi-Head Attention (MHA) to various GQA ratios.

Key Insights and Ideas

  • The Hidden Dimension is the Energy Killer: Prefill energy scales quadratically with the hidden dimension ($d$), while scaling only linearly with the number of layers ($L$). This makes $d$ the most sensitive architectural lever for energy efficiency.
  • GQA is a Massive Win: The law quantifies exactly how much GQA helps. More aggressive KV grouping can reduce per-token energy by up to 3x compared to standard MHA.
  • The "Sweet Spot" is Real: The authors analytically derived a formula for the optimal output length that minimizes energy per token. Generating too few tokens fails to amortize the prefill cost; generating too many makes the KV-cache management too expensive.
  • Reasoning Tokens Have Diminishing Returns: In "thinking" models (like DeepSeek-R1), accuracy increases with the reasoning token budget, but energy grows faster. The authors found that "Intelligence per Joule" actually peaks at an intermediate budget and can drop by over 3x if the budget is pushed too far.
  • The Agentic Tax: Agentic workflows (with massive 68K+ token prompts) increase energy per request by 13x. While prefix caching can slash prefill costs by 93%, it doesn't touch the KV-cache cost, which accounts for 86% of the remaining energy.

Key Results

  • High Accuracy: SIMPLE achieved an $R^2$ of 0.969 and a Mean Absolute Percentage Error (MAPE) of 11.97% across all tested LLMs.
  • Superior Generalization: In Leave-One-Out Cross-Validation (predicting energy for a model the system has never seen), SIMPLE outperformed previous SOTA LLM-agnostic models by 3.1–3.5x.
  • Efficiency Benchmarking: The model successfully explained why a Llama 3.2 1B model is ~10x more energy-efficient (in tokens per joule) than a Falcon-RW 7B, moving beyond simple parameter counts to structural explanations.

Limitations and Future Work

The current SIMPLE law has a few boundaries:

  • Architecture Scope: It is currently restricted to dense, decoder-only LLMs. It does not yet cover Mixture-of-Experts (MoE) architectures.
  • Hardware Specificity: The coefficients were fitted for NVIDIA H100 GPUs. While the law remains the same, the coefficients would need to be re-calculated for other accelerators (like TPUs or AMD GPUs).
  • Serving Dynamics: The model does not explicitly account for batch size or multi-GPU communication overheads (tensor/pipeline parallelism).

The authors plan to extend the law to include these workload parameters and multi-device deployments in future iterations.

Summary updated

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.
BibTeX
@misc{cavagna2026simple,
  author = {Hiari Pizzini Cavagna and Andrea Proia and Daniele Cesarini and Zeynep Kiziltan and Andrea Bartolini},
  title = {{The SIMPLE Law for Energy Cost of LLM Inference}},
  year = {2026},
  eprint = {2611.03330},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.03330},
}
Figure