<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Codecarbon on lo0 — Tech Blog</title><link>https://blog.lo0.es/en/tags/codecarbon/</link><description>Recent content in Codecarbon on lo0 — Tech Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 13 Jun 2026 02:00:00 +0200</lastBuildDate><atom:link href="https://blog.lo0.es/en/tags/codecarbon/index.xml" rel="self" type="application/rss+xml"/><item><title>Energy benchmarking in AI: frameworks, metrics and state of the art (tool by tool)</title><link>https://blog.lo0.es/en/posts/ai-energy-benchmarking-frameworks-metrics-state-of-the-art/</link><pubDate>Sat, 13 Jun 2026 02:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/ai-energy-benchmarking-frameworks-metrics-state-of-the-art/</guid><description>&lt;blockquote>
&lt;p>Notation: amounts in &lt;strong>euros (N €)&lt;/strong>, decimals with a point. The energy and carbon
references are &lt;strong>European&lt;/strong> (France, Germany, Spain), since this is a sovereign
proposal. The dollar sign is not used (on this site it is a formula delimiter).&lt;/p>
&lt;/blockquote>
&lt;h2 id="what-this-introduction-covers">What this introduction covers&lt;/h2>
&lt;p>Fourth article in the data series and &lt;em>deep dive&lt;/em> on the energy axis. Measuring the watts
of an AI workload looks like a sustainability detail, but it is at once a cost lever
(electricity is 30–50 % of TCO), an axis of sovereignty (carbon per token depends on
the country) and, increasingly, a regulatory obligation (emissions reporting). This
article inventories the metrics, where each figure physically comes from, the data sheet
for each measurement framework, and how to go from watt to carbon with European figures. No
recommendations; only data and methodology, because in energy, even more than in
performance, the measurement method changes the result.&lt;/p>
&lt;hr>
&lt;h2 id="why-measuring-energy-matters-with-numbers">Why measuring energy matters (with numbers)&lt;/h2>
&lt;p>Three quantified reasons, connecting with the &lt;a href="https://blog.lo0.es/en/posts/cost-performance-energy-three-axes-llm-inference/">opening article&lt;/a>:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Reason&lt;/th>
&lt;th>Figure&lt;/th>
&lt;th>Implication&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Cost&lt;/strong>&lt;/td>
&lt;td>electricity = 30–50 % of TCO&lt;/td>
&lt;td>measuring energy is measuring almost half the cost&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Sovereignty/carbon&lt;/strong>&lt;/td>
&lt;td>France ~9× fewer gCO₂/token than Germany&lt;/td>
&lt;td>the country of the cluster is a lever&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Scale/regulation&lt;/strong>&lt;/td>
&lt;td>datacenters ~460 TWh in 2025 (≈1.8 % worldwide), &amp;gt;800 TWh projected for 2028&lt;/td>
&lt;td>emissions reporting (CSRD) mandatory&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>At 700 W per H100, an 8-card node draws of the order of 5.6 kW from the boards alone, ~49,000
kWh a year. Applying PUE 1.4 that becomes ~68,700 kWh/year, and there the country decides the
bill: at the French wholesale price (~0.058 €/kWh) that is ~3,980 €/year of electricity per
node; in Germany (~0.091 €/kWh), ~6,250 €/year, 57 % more for the same iron and the same
work. Multiplied across a fleet, it is a first-order cost line, and a carbon footprint that,
in Europe, has to be measured and reported. Energy stopped being an engineering detail and
became a business and compliance variable.&lt;/p>
&lt;hr>
&lt;h2 id="the-energy-metrics">The energy metrics&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Metric&lt;/th>
&lt;th>Definition&lt;/th>
&lt;th>Unit&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Mean power&lt;/td>
&lt;td>average instantaneous consumption&lt;/td>
&lt;td>W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Energy per token&lt;/strong>&lt;/td>
&lt;td>energy consumed per generated token&lt;/td>
&lt;td>J/token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Energy per inference&lt;/td>
&lt;td>energy per request&lt;/td>
&lt;td>µJ – Wh&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Total energy&lt;/td>
&lt;td>integral of power over time&lt;/td>
&lt;td>Wh, kWh&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>PUE&lt;/strong> (Power Usage Effectiveness)&lt;/td>
&lt;td>datacenter overhead (cooling, losses)&lt;/td>
&lt;td>ratio ≥ 1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Carbon&lt;/td>
&lt;td>energy × grid intensity&lt;/td>
&lt;td>gCO₂eq&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The two base identities of the whole axis:&lt;/p>
$$\text{energy per token (J)} = \frac{\text{mean power (W)}}{\text{throughput (tok/s)}}$$
$$\text{carbon} = \text{energy (kWh)} \times \text{PUE} \times \text{grid intensity (gCO}_2\text{/kWh)}$$
&lt;p>The first has the same shape as cost per token: it shares the throughput denominator, so
raising tokens/s lowers energy per token. The second brings in the two multipliers
external to the compute, the datacenter PUE and the country&amp;rsquo;s grid intensity, which
can change carbon per token by an order of magnitude without touching the stack.&lt;/p>
&lt;hr>
&lt;h2 id="worked-example-energy-per-token-of-an-8h100-node">Worked example: energy per token of an 8×H100 node&lt;/h2>
&lt;p>To anchor the identities with numbers, the end-to-end calculation on the example node
(8×H100, Llama 3.1 70B FP16, vLLM at 2,800 tok/s):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Step&lt;/th>
&lt;th>Calculation&lt;/th>
&lt;th>Result&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Board power&lt;/td>
&lt;td>8 × 700 W&lt;/td>
&lt;td>5,600 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Energy per token (boards)&lt;/td>
&lt;td>5,600 ÷ 2,800&lt;/td>
&lt;td>2.0 J/token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Energy per token (with PUE 1.4)&lt;/td>
&lt;td>2.0 × 1.4&lt;/td>
&lt;td>2.8 J/token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Energy per 1M tokens (boards)&lt;/td>
&lt;td>2 × 10⁶ J&lt;/td>
&lt;td>0.56 kWh&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Energy per 1M tokens (with PUE)&lt;/td>
&lt;td>0.56 × 1.4&lt;/td>
&lt;td>0.78 kWh&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>From there come the electricity cost and the carbon, by country:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Country&lt;/th>
&lt;th>Electricity cost / 1M tok&lt;/th>
&lt;th>Carbon / 1M tok&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>France (0.058 €/kWh; ~40 gCO₂/kWh)&lt;/td>
&lt;td>~0.045 €&lt;/td>
&lt;td>~31 gCO₂&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Spain (0.054 €/kWh; ~160 gCO₂/kWh)&lt;/td>
&lt;td>~0.042 €&lt;/td>
&lt;td>~125 gCO₂&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Germany (0.091 €/kWh; ~363 gCO₂/kWh)&lt;/td>
&lt;td>~0.071 €&lt;/td>
&lt;td>~283 gCO₂&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>And the link with performance: if an optimisation (FP8, say) raised throughput to
4,200 tok/s, energy per token would drop to ~1.33 J/token (boards) and everything below it in
the same proportion. Electricity cost and carbon per token fall with throughput, by the
identity. Note: these are board + PUE figures; the complete node (CPU, NICs, PSUs)
consumes somewhat more, and energy measured with a power meter can differ from energy
estimated with &lt;code>nvidia-smi&lt;/code>.&lt;/p>
&lt;hr>
&lt;h2 id="where-the-figure-comes-from-the-measurement-layers">Where the figure comes from: the measurement layers&lt;/h2>
&lt;p>Not every energy figure is equally reliable. The figure can come from four layers, with
increasing accuracy and decreasing context:&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 240" role="img" aria-label="Layers the energy figure comes from: GPU counters NVML/DCGM, CPU RAPL, eBPF with models, and a physical power meter as the reference" xmlns="http://www.w3.org/2000/svg">
&lt;style>.bx{fill:none;stroke:currentColor;stroke-width:1.3}.tl{font:600 12px sans-serif;fill:currentColor}.ts{font:11px sans-serif;fill:currentColor}&lt;/style>
&lt;rect class="bx" x="20" y="36" width="360" height="42" rx="6"/>
&lt;text x="32" y="55" class="tl">GPU — NVML / nvidia-smi / DCGM&lt;/text>
&lt;text x="32" y="71" class="ts">card power from a hardware counter&lt;/text>
&lt;rect class="bx" x="20" y="90" width="360" height="42" rx="6"/>
&lt;text x="32" y="109" class="tl">CPU/DRAM — RAPL&lt;/text>
&lt;text x="32" y="125" class="ts">Intel/AMD counters via /proc, perf&lt;/text>
&lt;rect class="bx" x="20" y="144" width="360" height="42" rx="6"/>
&lt;text x="32" y="163" class="tl">Per-process/pod attribution — eBPF + model&lt;/text>
&lt;text x="32" y="179" class="ts">splits the watt between workloads (Kepler)&lt;/text>
&lt;rect class="bx" x="410" y="90" width="350" height="42" rx="6"/>
&lt;text x="422" y="109" class="tl">Physical power meter (reference)&lt;/text>
&lt;text x="422" y="125" class="ts">the ground truth everything is calibrated against&lt;/text>
&lt;text x="410" y="165" class="ts">The higher the layer, the more context (carbon) and&lt;/text>
&lt;text x="410" y="181" class="ts">the less direct accuracy; the meter is the standard.&lt;/text>
&lt;text x="20" y="216" class="ts">The GPU dominates in LLM inference; RAPL covers CPU/DRAM; eBPF splits per pod; the meter calibrates.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;p>The GPU is the dominant source in LLM inference, and its power is read from a hardware
counter (NVML/nvidia-smi, aggregated by DCGM, the same basis as
&lt;a href="https://blog.lo0.es/en/posts/gpu-observability-llm-inference-twelve-dcgm-vllm-metrics/">GPU observability&lt;/a>). RAPL gives CPU and
DRAM. The eBPF + model layer (Kepler) splits the total watt between containers and pods
without instrumenting the application. And the physical power meter is the ground truth
against which estimates are calibrated: no software estimate is better than the meter, only
more convenient.&lt;/p>
&lt;hr>
&lt;h2 id="how-it-is-instrumented-and-where-the-error-creeps-in">How it is instrumented (and where the error creeps in)&lt;/h2>
&lt;p>Four instrumentation decisions explain most of the discrepancies between energy
measurements:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Sampling rate.&lt;/strong> &lt;code>nvidia-smi&lt;/code>/DCGM read power at intervals; sampling that is too coarse
misses the peaks and underestimates the energy. It must be fine enough to capture the
power variation between prefill (high) and decode (lower).&lt;/li>
&lt;li>&lt;strong>Board vs node.&lt;/strong> GPU (board) power does not include CPU, NICs, fans or PSU losses
(typically an extra 10–20 %). Comparing a board energy figure with a complete-node one is
comparing different things.&lt;/li>
&lt;li>&lt;strong>Idle baseline.&lt;/strong> A powered GPU with no work already draws power. Is that idle attributed
to the workload or discounted? The decision changes energy per token, and idle matters: it
is real energy that someone pays for.&lt;/li>
&lt;li>&lt;strong>Time window.&lt;/strong> Energy is the integral of power over time; the measurement window has
to line up exactly with the workload (without counting warm-up or shutdown), or the number
does not correspond to the work measured.&lt;/li>
&lt;/ul>
&lt;p>These decisions, as in performance benchmarking, mean that &lt;strong>the measurement method matters
as much as the system measured&lt;/strong>. A J/token without a stated sampling rate, board/node
boundary and idle treatment is not comparable.&lt;/p>
&lt;hr>
&lt;h2 id="frameworks-tool-by-tool">Frameworks, tool by tool&lt;/h2>
&lt;h3 id="zeus-mlenergy-university-of-michigan">Zeus (ml.energy, University of Michigan)&lt;/h3>
&lt;p>What it does: measure and optimise the energy of deep learning workloads. Method: NVML
counters. Scope: NVIDIA and AMD GPUs, CPU, DRAM, Apple Silicon and NVIDIA Jetson. Licence:
OSS; academic backing (NSDI'23 paper). Differentiator: it does not only measure, it also
optimises (power capping, frequency selection) to cut energy without significant loss of
performance (&lt;a href="https://ml.energy/zeus/">Zeus Project&lt;/a>, &lt;a href="https://www.usenix.org/system/files/nsdi23-you.pdf">NSDI'23&lt;/a>).
It is the reference tool when the goal is to lower J/token, not just to measure them.&lt;/p>
&lt;h3 id="codecarbon">CodeCarbon&lt;/h3>
&lt;p>What it does: estimates the energy and the CO₂eq of compute processes. Method: reads the
GPU with &lt;code>nvidia-smi&lt;/code> and estimates CPU/RAM. Scope: CPU + GPU + RAM. Licence: OSS (Python).
Differentiator: it integrates into ML flows and CI pipelines, and it is the one that &lt;strong>comes
closest to the power meter&lt;/strong> among the Python tools (&lt;a href="https://medium.com/@prhmma/best-green-code-tools-july-2025-mainly-python-7ab415af0cd6">comparison&lt;/a>).
It brings carbon context out of the box. Limit: a high-level estimate, less exact than direct
hardware measurement.&lt;/p>
&lt;h3 id="carbontracker">CarbonTracker&lt;/h3>
&lt;p>What it does: tracks energy and carbon at GPU run time. Scope: GPU only, it measures
neither CPU nor memory. Licence: OSS. Differentiator: lightweight, easy to add to a
training/inference script. Limit: partial coverage (no CPU/DRAM), so it undercounts the total
system energy.&lt;/p>
&lt;h3 id="scaphandre">Scaphandre&lt;/h3>
&lt;p>What it does: a power metrology agent written in Rust. Method: RAPL (reads &lt;code>/proc&lt;/code>,
splits joules by CPU ticks). Scope: process or VM, with the &lt;strong>raw accuracy of the hardware
layer&lt;/strong>. Licence: OSS. Differentiator: the highest direct accuracy among the general-purpose
tools, at the cost of bringing no carbon context (it is pure metrology)
(&lt;a href="https://github.com/hubblo-org/scaphandre">Scaphandre · GitHub&lt;/a>). Limit: focused on CPU/RAPL;
for GPU it has to be combined with NVML.&lt;/p>
&lt;h3 id="kepler-cncf">Kepler (CNCF)&lt;/h3>
&lt;p>What it does: a Prometheus exporter that measures energy at container, pod and node level
in Kubernetes. Method: eBPF + ML models to estimate consumption per workload. Language:
Go + C. Licence: Apache 2.0 (the &lt;code>sustainable-computing-io&lt;/code> project) (&lt;a href="https://github.com/sustainable-computing-io/kepler">Kepler · GitHub&lt;/a>).
Differentiator: it is the cloud-native option for attributing energy per pod without
instrumenting the app, just as OpenCost attributes cost. Limit: attribution via eBPF + model
is estimation, not direct measurement; its accuracy depends on the model.&lt;/p>
&lt;h3 id="mlperf-power-mlcommons">MLPerf Power (MLCommons)&lt;/h3>
&lt;p>What it does: a standardised benchmark of energy efficiency, from µW to MW.
Maintainer: MLCommons. Differentiator: cross-vendor comparability of efficiency, with a
dataset spanning several years and workload versions (&lt;a href="https://arxiv.org/html/2410.12032v2">MLPerf Power, arXiv 2410.12032&lt;/a>).
It is to energy what MLPerf Inference is to performance: the comparison standard between
vendors.&lt;/p>
&lt;h3 id="comparison-table">Comparison table&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Tool&lt;/th>
&lt;th>Method&lt;/th>
&lt;th>Scope&lt;/th>
&lt;th>Licence&lt;/th>
&lt;th>Accuracy / note&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Zeus&lt;/strong>&lt;/td>
&lt;td>NVML / counters&lt;/td>
&lt;td>NV+AMD GPU, CPU, DRAM, Apple, Jetson&lt;/td>
&lt;td>OSS&lt;/td>
&lt;td>measures &lt;strong>and optimises&lt;/strong> DL energy&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>CodeCarbon&lt;/strong>&lt;/td>
&lt;td>nvidia-smi + estimation&lt;/td>
&lt;td>CPU+GPU+RAM, CO₂eq&lt;/td>
&lt;td>OSS (Python)&lt;/td>
&lt;td>the &lt;strong>closest to the power meter&lt;/strong> among Python tools&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>CarbonTracker&lt;/strong>&lt;/td>
&lt;td>GPU runtime&lt;/td>
&lt;td>&lt;strong>GPU only&lt;/strong>&lt;/td>
&lt;td>OSS&lt;/td>
&lt;td>lightweight; no CPU/mem&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Scaphandre&lt;/strong>&lt;/td>
&lt;td>RAPL (/proc)&lt;/td>
&lt;td>process/VM&lt;/td>
&lt;td>OSS (Rust)&lt;/td>
&lt;td>raw accuracy; no carbon context&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Kepler&lt;/strong>&lt;/td>
&lt;td>eBPF + model&lt;/td>
&lt;td>container/pod/node (K8s)&lt;/td>
&lt;td>Apache 2.0 (CNCF)&lt;/td>
&lt;td>cloud-native; model-based estimation&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>MLPerf Power&lt;/strong>&lt;/td>
&lt;td>standardised measurement&lt;/td>
&lt;td>µW to MW&lt;/td>
&lt;td>MLCommons&lt;/td>
&lt;td>cross-vendor comparability&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="accuracy-who-to-believe">Accuracy: who to believe&lt;/h2>
&lt;p>The difference between tools is not a nuance: Scaphandre offers the raw accuracy of the
hardware layer (RAPL), while the Python ones such as CodeCarbon give higher-level,
carbon-aware estimates, with more context but less direct exactness; among the Python tools,
CodeCarbon is the one that comes closest to the power meter, followed by CarbonTracker, with
variability across infrastructures (&lt;a href="https://medium.com/@prhmma/best-green-code-tools-july-2025-mainly-python-7ab415af0cd6">comparison&lt;/a>).
The rule: for sizing and design, a software estimate will do; to &lt;strong>defend a figure before
a committee or an auditor, calibrate against a power meter&lt;/strong> at least once, and use the
software tool as a continuous proxy. The measured figure beats the estimated one; the rest is
convenience.&lt;/p>
&lt;hr>
&lt;h2 id="energy-leaderboards-and-benchmarks">Energy leaderboards and benchmarks&lt;/h2>
&lt;p>To compare efficiency between models without building your own test bench:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Resource&lt;/th>
&lt;th>What it provides&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>MLPerf Power&lt;/strong>&lt;/td>
&lt;td>standardised efficiency measurement, from µW to MW&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>HF AI Energy Score&lt;/strong>&lt;/td>
&lt;td>comparable per-model energy efficiency ratings (&lt;a href="https://huggingface.github.io/AIEnergyScore/">HF&lt;/a>)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>ML.ENERGY Benchmark&lt;/strong>&lt;/td>
&lt;td>automated measurement and optimisation of inference energy&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>awesome-green-ai&lt;/strong>&lt;/td>
&lt;td>curated index of Green AI resources and tools (&lt;a href="https://github.com/samuelrince/awesome-green-ai">repo&lt;/a>)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>These resources give the order of magnitude of the energy per token of each model, useful for
choosing a model on efficiency at the design stage. But they do not replace measurement
on your hardware and your workload: a leaderboard measures on one specific bench, not on your
node.&lt;/p>
&lt;hr>
&lt;h2 id="from-watt-to-carbon-france-germany-spain">From watt to carbon: France, Germany, Spain&lt;/h2>
&lt;p>Here the energy axis turns into a sovereignty argument. Carbon per token comes from
multiplying the energy by the country&amp;rsquo;s grid intensity, which in Europe varies by almost
two orders of magnitude:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Country&lt;/th>
&lt;th>Wholesale (€/MWh, Mar 2026)&lt;/th>
&lt;th>Grid carbon (gCO₂/kWh)&lt;/th>
&lt;th>Profile&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>France&lt;/strong>&lt;/td>
&lt;td>~58&lt;/td>
&lt;td>&lt;strong>~20–60&lt;/strong>&lt;/td>
&lt;td>nuclear: cheap and very clean&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Spain&lt;/strong>&lt;/td>
&lt;td>~54&lt;/td>
&lt;td>&lt;strong>~150–170&lt;/strong>&lt;/td>
&lt;td>renewables + gas: cheap, medium carbon&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Germany&lt;/strong>&lt;/td>
&lt;td>~91&lt;/td>
&lt;td>&lt;strong>~363&lt;/strong> (2024 average)&lt;/td>
&lt;td>coal/gas + renewables: expensive and dirty&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Sources: wholesale prices (&lt;a href="https://tradingeconomics.com/france/electricity-price">TradingEconomics&lt;/a>),
Germany&amp;rsquo;s carbon ~363 gCO₂/kWh (2024 average, &lt;a href="https://en.wikipedia.org/wiki/Electricity_sector_in_Germany">Wikipedia&lt;/a>),
nuclear ~17–35 gCO₂e/kWh (&lt;a href="https://www.eea.europa.eu/en/analysis/indicators/greenhouse-gas-emission-intensity-of-1">EEA&lt;/a>),
Spain ~167 gCO₂/kWh (2020). Hourly intensity comes from ElectricityMaps.&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 230" role="img" aria-label="From watt to carbon by European country: the same energy per token multiplied by the grid intensity of France, Spain or Germany gives very different carbon per token" xmlns="http://www.w3.org/2000/svg">
&lt;style>.bx{fill:none;stroke:currentColor;stroke-width:1.3}.tl{font:600 12px sans-serif;fill:currentColor}.ts{font:11px sans-serif;fill:currentColor}.ar{fill:none;stroke:currentColor;stroke-width:1.3;marker-end:url(#em)}&lt;/style>
&lt;defs>&lt;marker id="em" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="currentColor"/>&lt;/marker>&lt;/defs>
&lt;rect class="bx" x="20" y="90" width="190" height="50" rx="6"/>
&lt;text x="32" y="111" class="tl">0.78 kWh / 1M tokens&lt;/text>
&lt;text x="32" y="128" class="ts">(energy with PUE)&lt;/text>
&lt;path class="ar" d="M210,100 L300,55"/>
&lt;path class="ar" d="M210,115 L300,115"/>
&lt;path class="ar" d="M210,130 L300,175"/>
&lt;rect class="bx" x="300" y="36" width="200" height="40" rx="6"/>
&lt;text x="312" y="56" class="tl">France (~40 gCO₂/kWh)&lt;/text>
&lt;text x="312" y="70" class="ts">→ ~31 gCO₂ / 1M tokens&lt;/text>
&lt;rect class="bx" x="300" y="95" width="200" height="40" rx="6"/>
&lt;text x="312" y="115" class="tl">Spain (~160 gCO₂/kWh)&lt;/text>
&lt;text x="312" y="129" class="ts">→ ~125 gCO₂ / 1M tokens&lt;/text>
&lt;rect class="bx" x="300" y="154" width="200" height="40" rx="6"/>
&lt;text x="312" y="174" class="tl">Germany (~363 gCO₂/kWh)&lt;/text>
&lt;text x="312" y="188" class="ts">→ ~283 gCO₂ / 1M tokens&lt;/text>
&lt;text x="540" y="110" class="ts">Same load, same iron:&lt;/text>
&lt;text x="540" y="128" class="ts">~9× more carbon in Germany&lt;/text>
&lt;text x="540" y="146" class="ts">than in France, just from the grid.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;p>The calculation, on the example node (0.78 kWh per million tokens, with PUE): in France
(~40 gCO₂/kWh) it is ~31 gCO₂ per million tokens; in Germany (~363 gCO₂/kWh), &lt;strong>~283
gCO₂, a factor of ~9×, without touching a line of the stack. Placing the cluster in
France or Spain is at once a cost lever, a carbon lever and a compliance lever&lt;/strong> (&lt;a href="https://blog.lo0.es/en/posts/eu-ai-act-technical-dossier-on-premise-llm-architecture/">EU AI Act&lt;/a>,
&lt;a href="https://blog.lo0.es/en/posts/technical-controls-ens-iso-42001-eu-ai-act-cross-mapping/">controls ENS × 42001 × EU AI Act&lt;/a>).&lt;/p>
&lt;hr>
&lt;h2 id="energy-efficiency-levers">Energy efficiency levers&lt;/h2>
&lt;p>Once it is measured, it can be brought down. The levers, ordered by the identity J/token = W ÷
throughput (lower the numerator or raise the denominator):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Lever&lt;/th>
&lt;th>Mechanism&lt;/th>
&lt;th>Effect&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Quantisation (FP8/INT4)&lt;/strong>&lt;/td>
&lt;td>more tokens per GPU-hour, less VRAM/KV&lt;/td>
&lt;td>raises throughput → lowers J/token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Batching / continuous batching&lt;/strong>&lt;/td>
&lt;td>amortises the fixed power cost&lt;/td>
&lt;td>raises throughput → lowers J/token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Power capping&lt;/strong> (Zeus)&lt;/td>
&lt;td>limits GPU power&lt;/td>
&lt;td>lowers W with little loss of throughput&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Efficiency-aware scheduling&lt;/strong>&lt;/td>
&lt;td>consolidate workloads, power down idle GPUs&lt;/td>
&lt;td>eliminates idle consumption&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Location (country)&lt;/strong>&lt;/td>
&lt;td>cleaner grid&lt;/td>
&lt;td>lowers carbon per token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Avoiding over-reasoning&lt;/strong>&lt;/td>
&lt;td>fewer reasoning tokens that add nothing&lt;/td>
&lt;td>less compute → less energy&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Quantisation (see &lt;a href="https://blog.lo0.es/en/posts/quantization-llm-inference-fp8-int4-gguf/">quantisation for inference&lt;/a>)
is the highest-return lever because it moves all three axes at once: it raises throughput,
lowers cost and lowers energy per token. Zeus&amp;rsquo;s power capping is energy-specific: it
trims peak power with little performance loss, lowering the W in the numerator. And idle,
the GPU powered but not working, is pure wasted energy that scheduling recovers.&lt;/p>
&lt;hr>
&lt;h2 id="from-design-to-production-where-energy-is-measured">From design to production: where energy is measured&lt;/h2>
&lt;p>As with the other axes, energy is measured at three moments, with different tools and
increasing accuracy:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Moment&lt;/th>
&lt;th>Tool&lt;/th>
&lt;th>What it gives&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Design&lt;/strong>&lt;/td>
&lt;td>TDP × hours (datasheet)&lt;/td>
&lt;td>ceiling estimate for sizing&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Benchmark&lt;/strong>&lt;/td>
&lt;td>Zeus, MLPerf Power, power meter&lt;/td>
&lt;td>energy per token measured on a controlled bench&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Production&lt;/strong>&lt;/td>
&lt;td>Kepler (eBPF), DCGM&lt;/td>
&lt;td>continuous per-pod consumption in the cluster&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The design figure (TDP) serves to size the utility feed and the cooling, but it
overestimates (the GPU is rarely at TDP 100 % of the time). The benchmark figure is the
one used for the proposal&amp;rsquo;s cost and carbon per token, because it is measured and
reproducible. And the production figure (Kepler/DCGM) closes the loop: it checks that real
consumption matches the budget and feeds the footprint report. The three have to be traceable
to each other, which is what the harness in article S4 does.&lt;/p>
&lt;hr>
&lt;h2 id="energy-in-tco-and-european-regulation">Energy in TCO and European regulation&lt;/h2>
&lt;p>The closing of the axis: energy is not only sustainability, it is cost and compliance.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Cost&lt;/strong>: being 30–50 % of TCO, every J/token improvement translates directly into euros. In
the example, moving from Germany (~0.091 €/kWh) to France (~0.058 €/kWh) lowers the
electricity share by ~37 % on top of the carbon.&lt;/li>
&lt;li>&lt;strong>Regulation (CSRD)&lt;/strong>: European companies must report their carbon footprint (scope 2).
A low-carbon grid (France) directly improves that reported figure, and measuring energy per
token stops being optional and becomes a reporting requirement.&lt;/li>
&lt;li>&lt;strong>EU AI Act&lt;/strong>: efficiency and energy consumption form part of the documentation expected of
AI systems, which makes energy measurement part of the technical file.&lt;/li>
&lt;/ul>
&lt;p>One reporting nuance worth knowing: the electricity footprint is scope 2 (indirect
emissions from purchased energy), and it can be accounted for by location (the real
intensity of the country&amp;rsquo;s grid) or by market (according to the guarantees of origin
contracted). Location-based accounting is the one that genuinely rewards putting the cluster
on a clean grid such as the French one; market-based accounting allows green energy to be
&amp;ldquo;bought&amp;rdquo; through certificates. Knowing which one your CSRD report requires changes which lever
(physical location vs contract) lowers the figure, and both start from measuring energy
per token, which is what this axis provides.&lt;/p>
&lt;p>In other words: measuring energy covers at once a first-order cost line, the carbon and
sovereignty argument, and a regulatory obligation. For a sovereign European proposal, the
energy axis is not the &amp;ldquo;nice sustainability bit&amp;rdquo;: it is one of the three columns with a number
attached.&lt;/p>
&lt;hr>
&lt;h2 id="checklist-for-a-reproducible-energy-measurement">Checklist for a reproducible energy measurement&lt;/h2>
&lt;p>For an energy or carbon figure to be defensible before a committee or an auditor, it has to
come with its context. The minimum to fix and publish:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>What to fix&lt;/th>
&lt;th>Why&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Tool + version&lt;/td>
&lt;td>each layer (RAPL, NVML, eBPF) and tool measures differently&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Sampling rate&lt;/td>
&lt;td>coarse sampling misses peaks&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Board vs node boundary&lt;/td>
&lt;td>±10–20 % depending on whether CPU/PSUs are included&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>PUE used&lt;/td>
&lt;td>it multiplies all the compute energy&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Source and time of the grid intensity&lt;/td>
&lt;td>carbon varies ~9× by country and by hour&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Idle treatment&lt;/td>
&lt;td>attributed or discounted changes the J/token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Model, precision and workload&lt;/td>
&lt;td>energy depends on what is served and how&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Calibration vs power meter&lt;/td>
&lt;td>at least once, to validate the estimate&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The rule: if you cannot hand over this table alongside the gCO₂/token figure, the figure is
not auditable. The reproducible harness of article S4 records all these parameters so that the
energy figure is as traceable as the cost and performance ones, and so that the reported
footprint (CSRD) holds up under audit.&lt;/p>
&lt;hr>
&lt;h2 id="state-of-the-art-2026">State of the art 2026&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>LLM-specific resolution is missing&lt;/strong>: general-purpose tools measure well at machine or
process level, but they lack LLM-specific resolution (energy per token, per prefill/decode
phase), and the simulators lack emissions modelling, an open gap in the field.&lt;/li>
&lt;li>&lt;strong>eBPF as a trend&lt;/strong> (Kepler) for attributing energy per pod without instrumenting the app,
in parallel to how OpenCost attributes cost.&lt;/li>
&lt;li>&lt;strong>Standardisation&lt;/strong> of comparison via MLPerf Power and HF AI Energy Score.&lt;/li>
&lt;li>&lt;strong>Optimisation, not only measurement&lt;/strong> (Zeus): the field is moving from &amp;ldquo;how much do I spend&amp;rdquo;
to &amp;ldquo;how do I spend less without losing performance&amp;rdquo;.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="limits-and-traps-data-driven">Limits and traps (data-driven)&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>Estimation vs measurement.&lt;/strong> An &lt;code>nvidia-smi&lt;/code> figure is not a power meter. Calibrate
against hardware at least once before defending a number.&lt;/li>
&lt;li>&lt;strong>Partial coverage.&lt;/strong> CarbonTracker measures GPU only; Scaphandre, mostly CPU/RAPL. Add the
layers or you undercount the total energy.&lt;/li>
&lt;li>&lt;strong>Forgetting PUE.&lt;/strong> Board energy does not include cooling or losses; without PUE you
underestimate the real consumption and carbon.&lt;/li>
&lt;li>&lt;strong>Carbon without a country.&lt;/strong> A gCO₂/token without a stated grid (and hour) means nothing:
it varies ~9× between France and Germany.&lt;/li>
&lt;li>&lt;strong>Confusing energy with sustainability.&lt;/strong> Here it is cost and compliance, with a number;
treating it as a &amp;ldquo;green&amp;rdquo; extra is losing one of the three columns of the proposal.&lt;/li>
&lt;/ol>
&lt;p>That closes the run of introductions: cost, performance and energy, each with its frameworks
and its methodology. The rest of the series goes tool by tool through to the dashboard that
underpins the sovereign architecture decision, with European figures, measured and
reproducible.&lt;/p>
&lt;h2 id="closing">Closing&lt;/h2>
&lt;p>Energy is the axis easiest to dismiss as &amp;ldquo;the green one&amp;rdquo; and the one that hides the most: it
is almost half the cost, it defines the footprint Europe requires to be reported, and its
carbon per token changes ~9× depending on whether the cluster sits in France or in Germany.
Measuring it properly, with the right layer, the right sampling, PUE included and the
country&amp;rsquo;s grid, turns a soft sustainability argument into a hard column of the proposal, with
a number and a source. And the sovereign conclusion stands on its own with the data in this
article: &lt;strong>an inference platform in France or Spain is at once cheaper, cleaner and compliant
with European jurisdiction than the same platform on a US hyperscaler&lt;/strong>, and that is
demonstrated with measured J/token, gCO₂/kWh by country and euros, not with intentions. The
energy axis does not decorate the proposal: it closes it.&lt;/p>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-energy-leaderboards-wh-per-token/">LLM energy efficiency leaderboards&lt;/a> — the J/token rankings where the numbers these tools measure land: which leaderboard to use, how to read it and what biases it carries.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/watt-to-carbon-pue-grid-intensity-gco2-per-token/">From watt to carbon: PUE, grid intensity and the real cost of a token&lt;/a> — how to convert the J/token measured with Zeus or Kepler into gCO₂eq using the datacenter PUE and the country&amp;rsquo;s electricity grid intensity.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/levers-fewer-watts-per-token-llm-inference/">Energy efficiency levers in LLM inference&lt;/a> — which configuration changes reduce the J/token these tools report: quantization, batching, engine, KV cache precision.&lt;/li>
&lt;/ul>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>Zeus Project (ml.energy, UMich) — &lt;a href="https://ml.energy/zeus/">https://ml.energy/zeus/&lt;/a>&lt;/li>
&lt;li>Zeus · USENIX NSDI'23 — &lt;a href="https://www.usenix.org/system/files/nsdi23-you.pdf">https://www.usenix.org/system/files/nsdi23-you.pdf&lt;/a>&lt;/li>
&lt;li>Kepler (CNCF, eBPF) · GitHub — &lt;a href="https://github.com/sustainable-computing-io/kepler">https://github.com/sustainable-computing-io/kepler&lt;/a>&lt;/li>
&lt;li>Scaphandre · GitHub — &lt;a href="https://github.com/hubblo-org/scaphandre">https://github.com/hubblo-org/scaphandre&lt;/a>&lt;/li>
&lt;li>CarbonTracker · GitHub — &lt;a href="https://github.com/saintslab/carbontracker">https://github.com/saintslab/carbontracker&lt;/a>&lt;/li>
&lt;li>MLPerf Power (arXiv 2410.12032) — &lt;a href="https://arxiv.org/html/2410.12032v2">https://arxiv.org/html/2410.12032v2&lt;/a>&lt;/li>
&lt;li>HF AI Energy Score — &lt;a href="https://huggingface.github.io/AIEnergyScore/">https://huggingface.github.io/AIEnergyScore/&lt;/a>&lt;/li>
&lt;li>awesome-green-ai — &lt;a href="https://github.com/samuelrince/awesome-green-ai">https://github.com/samuelrince/awesome-green-ai&lt;/a>&lt;/li>
&lt;li>TradingEconomics · precio electricidad Francia/Alemania/España — &lt;a href="https://tradingeconomics.com/france/electricity-price">https://tradingeconomics.com/france/electricity-price&lt;/a>&lt;/li>
&lt;li>EEA · intensidad de emisiones de la electricidad en Europa — &lt;a href="https://www.eea.europa.eu/en/analysis/indicators/greenhouse-gas-emission-intensity-of-1">https://www.eea.europa.eu/en/analysis/indicators/greenhouse-gas-emission-intensity-of-1&lt;/a>&lt;/li>
&lt;li>Electricity sector in Germany (carbono ~363 gCO₂/kWh) — &lt;a href="https://en.wikipedia.org/wiki/Electricity_sector_in_Germany">https://en.wikipedia.org/wiki/Electricity_sector_in_Germany&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>