<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kepler on lo0 — Tech Blog</title><link>https://blog.lo0.es/en/tags/kepler/</link><description>Recent content in Kepler on lo0 — Tech Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 14 Jun 2026 05:00:00 +0200</lastBuildDate><atom:link href="https://blog.lo0.es/en/tags/kepler/index.xml" rel="self" type="application/rss+xml"/><item><title>Measuring energy in production: Kepler, DCGM and the practical stack (accuracy and overhead)</title><link>https://blog.lo0.es/en/posts/measuring-energy-in-production-kepler-dcgm-stack/</link><pubDate>Sun, 14 Jun 2026 05:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/measuring-energy-in-production-kepler-dcgm-stack/</guid><description>&lt;blockquote>
&lt;p>Notation: amounts in &lt;strong>euros (N €)&lt;/strong>, decimals with a point. The dollar sign is not used
(on this site it is a formula delimiter).&lt;/p>
&lt;/blockquote>
&lt;h2 id="what-this-article-covers">What this article covers&lt;/h2>
&lt;p>Third article of the energy track (C3). C1 made the conceptual inventory of the tools;
here we get practical: how the measurement stack is deployed on Kubernetes, where each
piece takes its figures from, how accurate it is against a power meter, how much
overhead it adds, and how energy is attributed per pod and per MIG instance. It is the
equivalent of B2/B3 for energy: to stop talking about what each tool measures and start
building the bench that measures it. With commands; no recommendations, only the mechanics.&lt;/p>
&lt;hr>
&lt;h2 id="the-measurement-stack-on-kubernetes">The measurement stack on Kubernetes&lt;/h2>
&lt;p>To measure energy per workload on a GPU cluster, the practical stack has four pieces, and the
good news is that three of them you already have if you do observability:&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 230" role="img" aria-label="Energy measurement stack on Kubernetes: DCGM exporter and Kepler export to Prometheus, which Grafana visualises, with the power meter as calibration" xmlns="http://www.w3.org/2000/svg">
&lt;style>.bx{fill:none;stroke:currentColor;stroke-width:1.3}.dsh{fill:none;stroke:currentColor;stroke-width:1.3;stroke-dasharray:5 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="40" width="170" height="44" rx="6"/>&lt;text x="32" y="60" class="tl">DCGM exporter&lt;/text>&lt;text x="32" y="76" class="ts">GPU power&lt;/text>
&lt;rect class="bx" x="20" y="100" width="170" height="44" rx="6"/>&lt;text x="32" y="120" class="tl">Kepler (eBPF)&lt;/text>&lt;text x="32" y="136" class="ts">energy per pod/node&lt;/text>
&lt;path class="ar" d="M190,62 L250,90"/>
&lt;path class="ar" d="M190,122 L250,108"/>
&lt;rect class="bx" x="250" y="78" width="160" height="44" rx="6"/>&lt;text x="262" y="98" class="tl">Prometheus&lt;/text>&lt;text x="262" y="114" class="ts">time series&lt;/text>
&lt;path class="ar" d="M410,100 L470,100"/>
&lt;rect class="bx" x="470" y="78" width="160" height="44" rx="6"/>&lt;text x="482" y="98" class="tl">Grafana&lt;/text>&lt;text x="482" y="114" class="ts">panels · alerts&lt;/text>
&lt;rect class="dsh" x="650" y="78" width="110" height="44" rx="6"/>&lt;text x="662" y="98" class="tl">Power meter&lt;/text>&lt;text x="662" y="114" class="ts">calibration&lt;/text>
&lt;text x="20" y="180" class="ts">DCGM, Prometheus and Grafana are already there if you do GPU observability; Kepler adds per-pod attribution.&lt;/text>
&lt;text x="20" y="202" class="ts">The physical meter (point in time) calibrates the estimates: not part of the continuous stack, but the ground truth.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;p>The new piece compared with a normal observability stack is Kepler, which adds &lt;strong>energy
attribution per pod&lt;/strong>. DCGM already gives GPU power; Prometheus stores it; Grafana draws it. It
is reused infrastructure, not a new system, in line with &lt;a href="https://blog.lo0.es/en/posts/gpu-observability-llm-inference-twelve-dcgm-vllm-metrics/">GPU observability via DCGM&lt;/a>.&lt;/p>
&lt;hr>
&lt;h2 id="dcgm-exporter-the-base-of-gpu-power">DCGM exporter: the base of GPU power&lt;/h2>
&lt;p>GPU power, the dominant source in LLM inference, comes from NVIDIA&amp;rsquo;s dcgm-exporter
(part of the GPU Operator), which exposes DCGM metrics to Prometheus. The key metric is
&lt;code>DCGM_FI_DEV_POWER_USAGE&lt;/code> (instantaneous power in W), alongside utilisation
(&lt;code>DCGM_FI_DEV_GPU_UTIL&lt;/code>) and memory. With that, energy is the integral of power over time
across the workload&amp;rsquo;s window. DCGM gives power at card level; to split it per pod or per
MIG instance you need a layer on top, which is Kepler.&lt;/p>
&lt;hr>
&lt;h2 id="kepler-in-depth-ebpf-and-the-sources">Kepler in depth: eBPF and the sources&lt;/h2>
&lt;p>Kepler (Kubernetes-based Efficient Power Level Exporter) is a Prometheus exporter that
measures energy at container, pod and node level, using eBPF to keep overhead low and
scientific methods to improve accuracy (&lt;a href="https://github.com/sustainable-computing-io/kepler">Kepler · GitHub&lt;/a>).
Its strength is that it combines several power sources:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Source&lt;/th>
&lt;th>What it covers&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>RAPL&lt;/strong>&lt;/td>
&lt;td>CPU and DRAM&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>NVML&lt;/strong>&lt;/td>
&lt;td>NVIDIA GPU power&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>ACPI&lt;/strong>&lt;/td>
&lt;td>platform power management&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Redfish / IPMI&lt;/strong>&lt;/td>
&lt;td>platform power (BMC)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Regression models&lt;/strong>&lt;/td>
&lt;td>estimation when there is no real metric&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>For the GPU, the &lt;code>dcgmEndpoint&lt;/code> parameter points at the dcgm-exporter metrics URL, which
enables power attribution per MIG instance (&lt;a href="https://github.com/sustainable-computing-io/kepler/blob/main/docs/user/configuration.md">Kepler · configuration&lt;/a>).
That is: DCGM gives the card&amp;rsquo;s power, Kepler splits it between the pods (and MIG partitions)
that use it, via eBPF and models. The result is per-pod energy metrics in Prometheus, ready
for Grafana, usable for scheduling or scaling, consumption reporting and visualisation
(&lt;a href="https://github.com/sustainable-computing-io/kepler">Kepler · GitHub&lt;/a>).&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 210" role="img" aria-label="Kepler combines RAPL, NVML/DCGM, ACPI and Redfish, and with eBPF splits the energy per pod and per MIG instance" 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(#km)}&lt;/style>
&lt;defs>&lt;marker id="km" 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="36" width="150" height="30" rx="5"/>&lt;text x="30" y="56" class="ts">RAPL (CPU/DRAM)&lt;/text>
&lt;rect class="bx" x="20" y="76" width="150" height="30" rx="5"/>&lt;text x="30" y="96" class="ts">NVML/DCGM (GPU)&lt;/text>
&lt;rect class="bx" x="20" y="116" width="150" height="30" rx="5"/>&lt;text x="30" y="136" class="ts">ACPI · Redfish/IPMI&lt;/text>
&lt;path class="ar" d="M170,51 L230,80"/>
&lt;path class="ar" d="M170,91 L230,91"/>
&lt;path class="ar" d="M170,131 L230,102"/>
&lt;rect class="bx" x="230" y="70" width="170" height="44" rx="6"/>&lt;text x="242" y="90" class="tl">Kepler (eBPF + model)&lt;/text>&lt;text x="242" y="106" class="ts">splits the power&lt;/text>
&lt;path class="ar" d="M400,92 L460,92"/>
&lt;rect class="bx" x="460" y="70" width="180" height="44" rx="6"/>&lt;text x="472" y="90" class="tl">Energy per pod / MIG&lt;/text>&lt;text x="472" y="106" class="ts">→ Prometheus&lt;/text>
&lt;text x="20" y="180" class="ts">DCGM gives the card's power; Kepler attributes it to each pod and MIG partition, as OpenCost attributes cost.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;hr>
&lt;h2 id="deployment-a-daemonset-on-top-of-prometheus">Deployment: a DaemonSet on top of Prometheus&lt;/h2>
&lt;p>The deployment is a DaemonSet (one Kepler per node), pointing at the existing Prometheus
and at the dcgm-exporter:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Helm, pointing at the dcgm-exporter for GPU attribution&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">helm install kepler kepler/kepler &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --namespace kepler --create-namespace &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --set &lt;span class="nv">dcgmEndpoint&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;http://dcgm-exporter:9400/metrics&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Prerequisites: a kernel with eBPF, the dcgm-exporter running (from the GPU Operator) and
Prometheus scraping. Once deployed, Kepler exposes metrics such as
&lt;code>kepler_container_joules_total&lt;/code> per pod, queried with PromQL and drawn in Grafana. Energy per
workload stops being a manual estimate and becomes a continuous time series, just like cost
with OpenCost.&lt;/p>
&lt;hr>
&lt;h2 id="promql-queries-energy-per-pod">PromQL queries: energy per pod&lt;/h2>
&lt;p>With Kepler exporting, these are the queries that build the panels. The exact names vary by
version; check your &lt;code>/metrics&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-promql" data-lang="promql">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Cumulative energy per pod (joules)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nv">kepler_container_joules_total&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="c1"># Mean power per namespace over the last hour (W)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">sum&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">by&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">namespace&lt;/span>&lt;span class="o">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="kr">rate&lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">kepler_container_joules_total&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s">1h&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="o">))&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="c1"># GPU power per node (from DCGM, W)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">sum&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">by&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">node&lt;/span>&lt;span class="o">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">DCGM_FI_DEV_POWER_USAGE&lt;/span>&lt;span class="o">)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="c1"># Energy per token: power ÷ throughput (with a gateway/engine metric)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">sum&lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="kr">rate&lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">kepler_container_joules_total&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s">5m&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="o">))&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">sum&lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="kr">rate&lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">vllm_generation_tokens_total&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s">5m&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="o">))&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The last one closes the circle with the cost track: it crosses Kepler&amp;rsquo;s energy with the
engine/gateway tokens to give J/token in real time, per workload. With that in Grafana you
have energy per pod, per namespace and per token, continuously, the energy equivalent of the
OpenCost cost report.&lt;/p>
&lt;hr>
&lt;h2 id="a-calibration-procedure">A calibration procedure&lt;/h2>
&lt;p>Since Kepler estimates, it is worth calibrating once per node type. A simple procedure:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Power meter at the node input&lt;/strong> (or a PDU/BMC reading), measuring the node&amp;rsquo;s real power.&lt;/li>
&lt;li>&lt;strong>Controlled load&lt;/strong>: a stable sweep at a known power (the engine at 80 % GPU, say).&lt;/li>
&lt;li>&lt;strong>Compare&lt;/strong>: the node&amp;rsquo;s sum of &lt;code>kepler_container_joules_total&lt;/code> plus idle against the meter
reading over the same window.&lt;/li>
&lt;li>&lt;strong>Adjust&lt;/strong> Kepler&amp;rsquo;s factor or model if the deviation is noticeable, and document the
residual error.&lt;/li>
&lt;li>&lt;strong>Repeat&lt;/strong> for each node type (calibration is not transferable between different hardware).&lt;/li>
&lt;/ol>
&lt;p>With that residual error documented, Kepler&amp;rsquo;s continuous figure has a known error bar,
which is exactly what a CSRD auditor or a technical committee will ask for. Measuring without
calibrating gives a number with no credibility; calibrating once turns the continuous estimate
into a defensible figure.&lt;/p>
&lt;hr>
&lt;h2 id="accuracy-estimation-vs-power-meter">Accuracy: estimation vs power meter&lt;/h2>
&lt;p>The data honesty of the energy track: Kepler estimates (eBPF + models + counters), it does
not measure with a power meter. Accuracy depends on the source: with NVML/DCGM and RAPL
available, the figure is fairly faithful (it reads hardware counters); when it falls back on
regression models (with no real metric), it is an estimate with more error. Good practice:
calibrate against a physical power meter at least once per node type, adjust, and use
Kepler as a continuous proxy. The meter is the point-in-time ground truth; Kepler, the
continuous series calibrated against it. For a CSRD report that an auditor may challenge, that
initial calibration is what gives the continuous figure credibility.&lt;/p>
&lt;hr>
&lt;h2 id="overhead-the-cost-of-measuring">Overhead: the cost of measuring&lt;/h2>
&lt;p>Measuring energy has its own compute cost, worth budgeting for. In a Kubernetes environment,
the overhead of the monitoring system is split between the Prometheus server and the targets:
the Prometheus server consumes ~150 % of CPU (1.5 cores) and ~15 GB of RAM, while the
targets (node exporter and dcgm-exporter) together use ~35 % of CPU and ~300 MB of RAM
(&lt;a href="https://arxiv.org/pdf/2504.10702">arXiv · Container-level Energy Observability&lt;/a>). Kepler uses
eBPF precisely to keep its own overhead low. The reading: the bulk of the cost of measuring is
in Prometheus (which you probably already have for observability), not in the energy
exporters. Adding Kepler to an existing observability stack is marginal; standing up
Prometheus just for this would be expensive. That is why measuring energy is nearly free if
you already observe, and a project if you do not.&lt;/p>
&lt;hr>
&lt;h2 id="zeus-for-the-bench-and-for-optimisation-not-for-continuous-production">Zeus: for the bench and for optimisation, not for continuous production&lt;/h2>
&lt;p>Zeus (ml.energy) plays a different role: it is not a continuous production exporter, it is
the bench tool for measuring and optimising the energy of one specific workload (a
benchmark, a training run), with power capping and frequency selection. It fits into the
benchmarking flow (alongside GuideLLM/AIPerf): during a sweep, Zeus measures the energy per
configuration and lets you test the effect of power capping on performance. The practical
division: Kepler/DCGM in production (continuous per-pod attribution), Zeus on the bench
(fine measurement + optimisation of one workload), CodeCarbon if you want carbon context
integrated into an ML pipeline.&lt;/p>
&lt;hr>
&lt;h2 id="codecarbon-and-scaphandre-in-practice">CodeCarbon and Scaphandre in practice&lt;/h2>
&lt;p>The other two pieces, with their specific role:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>CodeCarbon&lt;/strong> integrates inside the code of an ML pipeline (a decorator or a context
manager wrapping the training or the inference), and returns the energy and the CO₂eq of
that block, using &lt;code>nvidia-smi&lt;/code> for the GPU and estimating CPU/RAM. It fits when you want the
carbon figure per experiment or per ML job, integrated into the data flow, not at
infrastructure level. It is the closest to the power meter among the Python tools.&lt;/li>
&lt;li>&lt;strong>Scaphandre&lt;/strong> is a metrology agent in Rust that reads RAPL and gives process/VM power
with raw hardware accuracy. For CPU it is very accurate; for GPU it has to be combined with
NVML. It fits when you need the most faithful CPU metrology, or a lightweight agent
independent of Kubernetes.&lt;/li>
&lt;/ul>
&lt;p>The division with Kepler: Kepler attributes energy per pod in the cluster (the
infrastructure view); CodeCarbon gives carbon per ML job (the pipeline view);
Scaphandre gives raw CPU metrology. They do not compete; they cover different layers, and
a mature platform uses whichever matches the question.&lt;/p>
&lt;hr>
&lt;h2 id="choosing-the-stack-by-objective">Choosing the stack by objective&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Objective&lt;/th>
&lt;th>Tool&lt;/th>
&lt;th>Why&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Continuous per-pod attribution (production)&lt;/td>
&lt;td>&lt;strong>Kepler + DCGM&lt;/strong>&lt;/td>
&lt;td>eBPF, per pod/MIG, into Prometheus&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Fine measurement + optimisation (bench)&lt;/td>
&lt;td>&lt;strong>Zeus&lt;/strong>&lt;/td>
&lt;td>measures and optimises (power capping)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Carbon in an ML pipeline&lt;/td>
&lt;td>&lt;strong>CodeCarbon&lt;/strong>&lt;/td>
&lt;td>integrated CO₂eq, close to the power meter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Raw CPU accuracy (RAPL)&lt;/td>
&lt;td>&lt;strong>Scaphandre&lt;/strong>&lt;/td>
&lt;td>hardware metrology&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Calibration / ground truth&lt;/td>
&lt;td>&lt;strong>power meter&lt;/strong>&lt;/td>
&lt;td>the standard everything is calibrated against&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>It is not &amp;ldquo;one tool&amp;rdquo;, it is a stack by objective: continuous production (Kepler/DCGM),
bench (Zeus), reporting (CodeCarbon), calibration (power meter). Mixing them according to the
phase is what gives a complete and credible energy measurement.&lt;/p>
&lt;hr>
&lt;h2 id="from-figure-to-action">From figure to action&lt;/h2>
&lt;p>Measuring is the start; the value is in acting. With energy per pod in Prometheus:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Reporting (CSRD)&lt;/strong>: the carbon footprint per workload, calibrated, ready for regulatory
reporting.&lt;/li>
&lt;li>&lt;strong>Energy/carbon-aware scheduling&lt;/strong>: move deferrable load to hours or nodes of lower
intensity (connects with the hourly carbon of the Spanish grid).&lt;/li>
&lt;li>&lt;strong>Power capping&lt;/strong>: with Zeus, trim peak power with little performance loss, lowering the W in
the numerator of J/token.&lt;/li>
&lt;li>&lt;strong>Optimisation&lt;/strong>: identify pods with poor energy efficiency (a lot of energy per token) and
attack them with quantisation or batching.&lt;/li>
&lt;/ul>
&lt;p>The measurement stack is not a panel to look at: it is the input to scheduling, optimisation
and reporting decisions. Just as OpenCost closes the cost loop, Kepler+DCGM closes the energy
one.&lt;/p>
&lt;hr>
&lt;h2 id="from-energy-to-carbon-the-final-layer">From energy to carbon: the final layer&lt;/h2>
&lt;p>The energy figure (kWh) becomes carbon by multiplying by the grid intensity, and here the
practical stack connects with the hourly source. In Spain, the intensity is published by &lt;strong>Red
Eléctrica (esios) and aggregated by ElectricityMaps&lt;/strong>, hour by hour. The pattern:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-promql" data-lang="promql">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Carbon per workload: energy (kWh) × grid intensity (gCO2/kWh)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="k">sum&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">by&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">namespace&lt;/span>&lt;span class="o">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="kr">increase&lt;/span>&lt;span class="o">(&lt;/span>&lt;span class="nv">kepler_container_joules_total&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="s">1h&lt;/span>&lt;span class="p">]&lt;/span>&lt;span class="o">))&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">/&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="mf">3.6&lt;/span>&lt;span class="nv">e6&lt;/span>&lt;span class="o">)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="o">*&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">on&lt;/span>&lt;span class="o">()&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">group_left&lt;/span>&lt;span class="o">()&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nv">grid_carbon_intensity_gco2_kwh&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>where &lt;code>grid_carbon_intensity_gco2_kwh&lt;/code> is a metric you feed from esios/ElectricityMaps (an
exporter or a periodic push). With that, the Grafana panel shows &lt;strong>gCO₂ per namespace and per
token, hour by hour&lt;/strong>, not an annual average. And since Spanish intensity varies a lot (from
~80 in solar hours to ~250 on gas-heavy nights), that hourly resolution is what enables
carbon-aware scheduling: moving the deferrable work to the clean hours lowers the measured
carbon. The measurement stack does not only report carbon; with the hourly figure, it &lt;strong>allows
it to be reduced&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="energy-efficiency-kpis-to-watch">Energy efficiency KPIs to watch&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>KPI&lt;/th>
&lt;th>What it indicates&lt;/th>
&lt;th>Where from&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>J/token per model&lt;/strong>&lt;/td>
&lt;td>energy efficiency&lt;/td>
&lt;td>Kepler ÷ engine tokens&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Mean power per pod&lt;/strong>&lt;/td>
&lt;td>consumption per workload&lt;/td>
&lt;td>&lt;code>rate(kepler_container_joules_total)&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>gCO₂/token (hourly)&lt;/strong>&lt;/td>
&lt;td>real footprint&lt;/td>
&lt;td>energy × grid intensity&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Idle energy&lt;/strong>&lt;/td>
&lt;td>waste&lt;/td>
&lt;td>power of pods with no traffic&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Effective PUE&lt;/strong>&lt;/td>
&lt;td>DC overhead&lt;/td>
&lt;td>total energy ÷ compute energy&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>These five turn the energy panel into a decision tool: which model is more efficient, which pod
wastes, when it pays to schedule. Without them the stack is a pretty panel; with them, it is
the input to optimisation and reporting.&lt;/p>
&lt;hr>
&lt;h2 id="example-energy-attribution-on-a-multi-tenant-cluster">Example: energy attribution on a multi-tenant cluster&lt;/h2>
&lt;p>With Kepler splitting per pod, an energy report per team on the example node (8×H100,
5.6 kW of boards, ~7.84 kW with PUE), over one month:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Team&lt;/th>
&lt;th>Energy/month (kWh)&lt;/th>
&lt;th>gCO₂ (ES grid ~160)&lt;/th>
&lt;th>Mean J/token&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>A · chat-prod&lt;/td>
&lt;td>~3,100&lt;/td>
&lt;td>~496 kg&lt;/td>
&lt;td>~2.2 J/tok&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>B · batch&lt;/td>
&lt;td>~1,400&lt;/td>
&lt;td>~224 kg&lt;/td>
&lt;td>~2.8 J/tok&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>C · experimentation&lt;/td>
&lt;td>~900&lt;/td>
&lt;td>~144 kg&lt;/td>
&lt;td>~6.5 J/tok&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>idle&lt;/td>
&lt;td>~250&lt;/td>
&lt;td>~40 kg&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>What it reveals: A is efficient (FP8, high utilisation → 2.2 J/token); C is inefficient
(6.5 J/token, underused GPU), just as it dragged the idle cost in the FinOps track. The carbon
column takes the figure into the per-team CSRD report. And the idle row (~250 kWh, ~40 kg
CO₂) is pure wasted energy. Without Kepler, that split does not exist: you would only see the
node&amp;rsquo;s total consumption, with no idea whose each watt is. With it, energy is attributable and
actionable, exactly like cost with OpenCost. In fact, the two panels together (OpenCost cost +
Kepler energy) give the complete picture of efficiency per team.&lt;/p>
&lt;hr>
&lt;h2 id="energy-and-carbon-aware-scheduling">Energy and carbon-aware scheduling&lt;/h2>
&lt;p>The highest-return action the stack enables: scheduling by energy and carbon. With energy
per pod and hourly grid intensity in Prometheus, two policies:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>By carbon&lt;/strong>: move the deferrable load (training, ingestion, overnight batch) to the
hours of lowest grid intensity. In Spain, the hours of peak solar (~80 gCO₂/kWh) against
gas-heavy nights (~250). The same workload emits ~3× less when scheduled at the right hour.&lt;/li>
&lt;li>&lt;strong>By efficiency&lt;/strong>: consolidate workloads to eliminate idle (a powered GPU with no work is
wasted energy), and direct each workload to the hardware most efficient for it.&lt;/li>
&lt;/ul>
&lt;p>Both use the same data (energy per pod + hourly intensity) that the stack already exposes, and
they connect with cluster scheduling (Kueue/Volcano). It is the difference between
measuring carbon (and reporting it) and reducing it (by scheduling). The C3 stack
enables both.&lt;/p>
&lt;hr>
&lt;h2 id="deployment-checklist">Deployment checklist&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Step&lt;/th>
&lt;th>Action&lt;/th>
&lt;th>Verification&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>dcgm-exporter (GPU Operator)&lt;/td>
&lt;td>&lt;code>DCGM_FI_DEV_POWER_USAGE&lt;/code> in Prometheus&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>Kepler DaemonSet, kernel with eBPF&lt;/td>
&lt;td>&lt;code>kepler_container_joules_total&lt;/code> per pod&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>&lt;code>dcgmEndpoint&lt;/code> pointing at the exporter&lt;/td>
&lt;td>GPU/MIG attribution works&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td>Grid intensity metric (esios)&lt;/td>
&lt;td>&lt;code>grid_carbon_intensity&lt;/code> in Prometheus&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>5&lt;/td>
&lt;td>Calibration vs power meter (once per node type)&lt;/td>
&lt;td>error bar documented&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>6&lt;/td>
&lt;td>Grafana panels (J/token, carbon, idle)&lt;/td>
&lt;td>KPIs visible&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Step 5 (calibration) is the one most often skipped and the one that gives the figure
credibility; step 3 (&lt;code>dcgmEndpoint&lt;/code>) is the one most often forgotten, and without it the GPU is
not attributed.&lt;/p>
&lt;hr>
&lt;h2 id="energy-by-phase-prefill-vs-decode">Energy by phase: prefill vs decode&lt;/h2>
&lt;p>A level of detail the stack allows and that guides optimisation: power is not constant
during a request. Prefill (processing the prompt) is compute-bound and draws a lot of power
in a burst; decode (generating tokens) is memory-bound and draws a lower peak but for
longer. With fine DCGM sampling that bimodal profile is visible, and it has consequences:&lt;/p>
&lt;ul>
&lt;li>A workload with long prompts (a lot of prefill) has a different power profile from one with
long generation (a lot of decode), even if they produce the same tokens.&lt;/li>
&lt;li>&lt;strong>Power capping&lt;/strong> affects each phase differently: trimming peak power mostly touches the
prefill.&lt;/li>
&lt;/ul>
&lt;p>For most cases the mean J/token is enough; to optimise energy efficiency thoroughly,
separating prefill and decode consumption (aligning the DCGM window with each phase) reveals
where the spend is. It is the energy equivalent of separating TTFT and TPOT in benchmarking,
the same principle, measuring the two phases separately because they behave differently.&lt;/p>
&lt;hr>
&lt;h2 id="state-of-the-art-the-llm-resolution-gap">State of the art: the LLM resolution gap&lt;/h2>
&lt;p>An honest note on the limits of current tooling. The general-purpose tools (Kepler,
CodeCarbon, Scaphandre) measure well at machine, process and pod level, but they &lt;strong>lack
LLM-specific resolution&lt;/strong>: out of the box they do not distinguish prefill from decode energy,
nor energy per token by phase, nor the energy cost of a reasoning block against a normal
response. It is an open gap in the field: per-pod attribution exists, but attribution &lt;strong>per
token and per inference phase&lt;/strong> has to be built by crossing power (DCGM/Kepler) with engine
metrics (vLLM exposes tokens per phase). The 2026 state of the art is a mature stack for
infrastructure and an emerging one for LLM-specific resolution, exactly the crossing
that the reproducible harness (S4) has to build by hand. Acknowledging it avoids promising a
per-token accuracy that the general-purpose tools do not deliver on their own.&lt;/p>
&lt;hr>
&lt;h2 id="limits-and-traps-data-driven">Limits and traps (data-driven)&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>Uncalibrated estimation.&lt;/strong> Kepler estimates; without calibrating against a power meter at
least once, the figure can carry a noticeable error, especially when it falls back on
regression models.&lt;/li>
&lt;li>&lt;strong>Forgetting the &lt;code>dcgmEndpoint&lt;/code>.&lt;/strong> Without pointing Kepler at the dcgm-exporter, GPU (and
MIG) attribution does not work; it is the key parameter for GPU.&lt;/li>
&lt;li>&lt;strong>Accounting for overhead badly.&lt;/strong> The bulk of the cost of measuring is in Prometheus; if
you stand it up just for energy, budget for it (1.5 cores, 15 GB).&lt;/li>
&lt;li>&lt;strong>Confusing bench and production.&lt;/strong> Zeus measures one workload finely; Kepler attributes
continuously in production. Using one for the other gives the wrong figure.&lt;/li>
&lt;li>&lt;strong>Misaligned windows.&lt;/strong> For energy per token, the power window and the token window must
coincide; if they do not, the J/token does not correspond.&lt;/li>
&lt;/ol>
&lt;p>With the measurement stack in place, the energy track has its instrumentation; the following
articles (C6 carbon, C8 TCO and regulation) build on this data. The foundation is this: a
continuous per-pod measurement, calibrated, on top of the observability infrastructure you
already have.&lt;/p>
&lt;h2 id="closing">Closing&lt;/h2>
&lt;p>Measuring the energy of an AI cluster in production does not require a new system: it requires
adding Kepler, per-pod attribution via eBPF, to the DCGM, Prometheus and Grafana stack you
already have for observability. That is the central idea of C3: the cost of measuring is almost
entirely in the Prometheus you already pay for, and Kepler turns it from &amp;ldquo;card power&amp;rdquo; into
&amp;ldquo;energy per pod, per team and per token&amp;rdquo;. With two cautions that separate a credible figure
from a decorative panel: calibrate once against a power meter (to have an error bar that
survives an audit) and point the &lt;code>dcgmEndpoint&lt;/code> (without which the GPU is not attributed).
Done that way, energy stops being the soft axis of sustainability and becomes an actionable
time series: the J/token per model that exposes inefficiency, the hourly carbon that enables
clean scheduling, the idle that gets recovered, and the CSRD report that holds up. For the
sovereign platform, the Kepler+DCGM stack closes the energy loop just as OpenCost closes the
cost one, and together, with GuideLLM&amp;rsquo;s goodput, they give the three faces of the dashboard
measured on the same iron, in euros, joules and grams of CO₂.&lt;/p>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/mlperf-power-energy-efficiency-benchmark/">MLPerf Power&lt;/a> — the standard measurement at the wall (PTDaemon), complementary to software instrumentation (DCGM/RAPL/Kepler).&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/measuring-gpu-power-nvml-dcgm-sampling-errors/">Measuring the power of a GPU: NVML, DCGM and sampling errors&lt;/a> — the sensor metrology that feeds all these tools: averaging window, cumulative counter and what falls outside the counter.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/llm-energy-leaderboards-wh-per-token/">LLM energy efficiency leaderboards&lt;/a> — where the J/token these tools produce end up: the public rankings and how to interpret them without being misled by the setup.&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> — the conversion step from measured watts to gCO₂eq and to euros, applying 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> — the optimisations that reduce the consumption these tools measure: quantization, batching, engine and power schedulers.&lt;/li>
&lt;/ul>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>Kepler · GitHub (CNCF, eBPF, por pod/nodo) — &lt;a href="https://github.com/sustainable-computing-io/kepler">https://github.com/sustainable-computing-io/kepler&lt;/a>&lt;/li>
&lt;li>Kepler · configuración (fuentes, dcgmEndpoint para MIG) — &lt;a href="https://github.com/sustainable-computing-io/kepler/blob/main/docs/user/configuration.md">https://github.com/sustainable-computing-io/kepler/blob/main/docs/user/configuration.md&lt;/a>&lt;/li>
&lt;li>CNCF · explorando Kepler (consumo de aplicaciones cloud) — &lt;a href="https://www.cncf.io/blog/2023/10/11/exploring-keplers-potentials-unveiling-cloud-application-power-consumption/">https://www.cncf.io/blog/2023/10/11/exploring-keplers-potentials-unveiling-cloud-application-power-consumption/&lt;/a>&lt;/li>
&lt;li>Red Hat · Kepler: monitorización eficiente de energía para Kubernetes — &lt;a href="https://next.redhat.com/2023/08/22/introducing-kepler-efficient-power-monitoring-for-kubernetes/">https://next.redhat.com/2023/08/22/introducing-kepler-efficient-power-monitoring-for-kubernetes/&lt;/a>&lt;/li>
&lt;li>arXiv · Container-level Energy Observability in Kubernetes (overhead) — &lt;a href="https://arxiv.org/pdf/2504.10702">https://arxiv.org/pdf/2504.10702&lt;/a>&lt;/li>
&lt;li>NVIDIA · dcgm-exporter — &lt;a href="https://github.com/NVIDIA/dcgm-exporter">https://github.com/NVIDIA/dcgm-exporter&lt;/a>&lt;/li>
&lt;li>Zeus Project (ml.energy) — &lt;a href="https://ml.energy/zeus/">https://ml.energy/zeus/&lt;/a>&lt;/li>
&lt;/ul></description></item><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>