<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zeus on lo0 — Tech Blog</title><link>https://blog.lo0.es/en/tags/zeus/</link><description>Recent content in Zeus on lo0 — Tech Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 29 Aug 2026 08:00:00 +0200</lastBuildDate><atom:link href="https://blog.lo0.es/en/tags/zeus/index.xml" rel="self" type="application/rss+xml"/><item><title>Measuring the power of a GPU: NVML, DCGM and the sampling errors that invalidate your watts</title><link>https://blog.lo0.es/en/posts/measuring-gpu-power-nvml-dcgm-sampling-errors/</link><pubDate>Sat, 29 Aug 2026 08:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/measuring-gpu-power-nvml-dcgm-sampling-errors/</guid><description>&lt;blockquote>
&lt;p>Notation: amounts in &lt;strong>euros (N €)&lt;/strong>, decimals with a point. The dollar symbol is not used
(on this site it is a formula delimiter).&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>A GPU power sensor does not return what almost everyone believes. The NVML documentation is explicit: on Ampere except GA100, and on later architectures including &lt;strong>H100&lt;/strong>, &lt;code>nvmlDeviceGetPowerUsage&lt;/code> returns power averaged over a one-second interval, not instantaneous power. The University of Oxford study presented at SC24, covering more than 70 GPUs across 25 models checked against an external 1 mΩ meter, adds the fact that breaks most published measurements: on the A100 and H100 the sensor only samples 25 % of the time (a 25 ms window within a 101 ms period), so during the remaining 75 % the GPU may be consuming something radically different. Integrating power naively over nine real benchmarks, the mean error was 39.27 %; applying good practice brought it down to 4.89 %. The operational consequence is short: if the hardware is Volta or later, use the &lt;strong>accumulated energy counter&lt;/strong> (&lt;code>nvmlDeviceGetTotalEnergyConsumption&lt;/code>, in millijoules) and subtract, rather than integrating samples. And the GPU counter is not the bill: on measured 8× H100 nodes, the node reaches 8.4 kW against 5.6 kW of summed GPU TDP, node idle is 1.8 kW, and with an average PUE of 1.54 the NVML watts are of the order of 43 % of the watts the utility bills.&lt;/p>
&lt;hr>
&lt;h2 id="what-the-hardware-exposes">What the hardware exposes&lt;/h2>
&lt;h3 id="nvml-power">NVML: power&lt;/h3>
&lt;p>&lt;code>nvmlDeviceGetPowerUsage(device, unsigned int* power)&lt;/code> returns &lt;strong>milliwatts&lt;/strong> for the GPU &lt;em>and its associated circuitry, for example the memory&lt;/em>. It has been supported since Fermi. The note in the official documentation is the part almost nobody quotes (&lt;a href="https://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceQueries.html">NVML Device Queries&lt;/a>):&lt;/p>
&lt;blockquote>
&lt;p>On Fermi and Kepler the reading is accurate to ±5 % of current consumption. &lt;strong>On Ampere (except GA100) or later, the API returns power averaged over a 1 s interval. On GA100 and earlier architectures instantaneous power is returned.&lt;/strong>&lt;/p>
&lt;/blockquote>
&lt;p>In other words, on an H100 or an L40S the usual call already delivers a one-second moving average. Anyone sampling it at 1 Hz and integrating is applying a second filter on top of an already filtered signal, without declaring it. To disambiguate, NVML exposes two separate fields accessible via &lt;code>nvmlDeviceGetFieldValues&lt;/code>: &lt;code>NVML_FI_DEV_POWER_AVERAGE&lt;/code> and &lt;code>NVML_FI_DEV_POWER_INSTANT&lt;/code>, with command-line equivalents (&lt;code>nvidia-smi --query-gpu=power.draw.average&lt;/code> and &lt;code>power.draw.instant&lt;/code>).&lt;/p>
&lt;h3 id="nvml-the-energy-counter">NVML: the energy counter&lt;/h3>
&lt;p>&lt;code>nvmlDeviceGetTotalEnergyConsumption&lt;/code> returns accumulated energy in millijoules since the last driver reload, supported on Volta or later. It is a 64-bit integer, so overflow is not a practical problem: an H100 at 700 W consumes of the order of 6.1·10¹⁰ J per year against a counter range of 1.8·10¹⁶ J. The only event that resets it is a driver reload or a system restart, and that does need watching: a &lt;code>modprobe -r nvidia&lt;/code> halfway through a campaign produces a negative delta.&lt;/p>
&lt;p>NVIDIA does not document the internal time resolution of the counter, its accumulation mechanism or its accuracy, and I have found no peer-reviewed work validating it against an external meter. The recommendation to use it, which the rest of this sheet rests on, is a structural argument (it removes quadrature error and aliasing error), not a published empirical validation.&lt;/p>
&lt;h3 id="nvml-power-limits">NVML: power limits&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Function&lt;/th>
&lt;th>Unit&lt;/th>
&lt;th>Semantics&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>nvmlDeviceGetPowerManagementLimit&lt;/code>&lt;/td>
&lt;td>mW&lt;/td>
&lt;td>Currently configured limit&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nvmlDeviceGetPowerManagementLimitConstraints&lt;/code>&lt;/td>
&lt;td>mW&lt;/td>
&lt;td>Legal minimum and maximum range&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nvmlDeviceGetPowerManagementDefaultLimit&lt;/code>&lt;/td>
&lt;td>mW&lt;/td>
&lt;td>Limit the card boots with&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>nvmlDeviceGetEnforcedPowerLimit&lt;/code>&lt;/td>
&lt;td>mW&lt;/td>
&lt;td>Effective limit after considering &lt;strong>all&lt;/strong> limiters, including the out-of-band interface&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>For an auditable measurement you have to record &lt;strong>&lt;code>EnforcedPowerLimit&lt;/code>&lt;/strong>, not &lt;code>PowerManagementLimit&lt;/code>: the BMC may be imposing an out-of-band ceiling that the latter does not reflect, and two apparently identical nodes may be operating at different ceilings.&lt;/p>
&lt;h3 id="dcgm-the-equivalent-fields">DCGM: the equivalent fields&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Field&lt;/th>
&lt;th>ID&lt;/th>
&lt;th>Unit&lt;/th>
&lt;th>Type in the exporter&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>DCGM_FI_DEV_POWER_USAGE&lt;/code>&lt;/td>
&lt;td>155&lt;/td>
&lt;td>watts in floating point&lt;/td>
&lt;td>gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>DCGM_FI_DEV_TOTAL_ENERGY_CONSUMPTION&lt;/code>&lt;/td>
&lt;td>156&lt;/td>
&lt;td>accumulated millijoules&lt;/td>
&lt;td>counter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>DCGM_FI_DEV_POWER_MGMT_LIMIT&lt;/code>&lt;/td>
&lt;td>160&lt;/td>
&lt;td>mW&lt;/td>
&lt;td>gauge&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>DCGM_FI_DEV_ENFORCED_POWER_LIMIT&lt;/code>&lt;/td>
&lt;td>164&lt;/td>
&lt;td>mW&lt;/td>
&lt;td>gauge&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Both energy fields are active in the default counter file of &lt;code>dcgm-exporter&lt;/code>. The audit conclusion is direct: a standard Prometheus panel integrating &lt;code>DCGM_FI_DEV_POWER_USAGE&lt;/code> is integrating a gauge that is already a one-second average of the sensor, sampled at the exporter&amp;rsquo;s &lt;code>collect-interval&lt;/code>. For energy per token the correct metric is counter 156 with &lt;code>increase()&lt;/code>.&lt;/p>
&lt;h2 id="the-real-accuracy-of-the-sensor">The real accuracy of the sensor&lt;/h2>
&lt;p>The reference is the work of Yang, Adámek and Armour (University of Oxford), published at SC24 and available as &lt;a href="https://arxiv.org/html/2312.02741v3">arXiv:2312.02741&lt;/a>: more than 70 GPUs across 25 models, including 10 H100s and 10 A100s, checked against an external meter with a 1 mΩ shunt, a 12-bit ADC and internal sampling at 34 kHz.&lt;/p>
&lt;h3 id="update-period-and-averaging-window">Update period and averaging window&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>GPU or architecture&lt;/th>
&lt;th>Update period&lt;/th>
&lt;th>Averaging window&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Kepler and Maxwell&lt;/td>
&lt;td>10-50 Hz&lt;/td>
&lt;td>logarithmic growth, ~200 ms&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Volta (V100)&lt;/td>
&lt;td>20 ms&lt;/td>
&lt;td>10 ms&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Turing&lt;/td>
&lt;td>100 ms&lt;/td>
&lt;td>100 ms&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>A100 (GA100)&lt;/strong>&lt;/td>
&lt;td>&lt;strong>101 ms&lt;/strong>&lt;/td>
&lt;td>&lt;strong>25 ms&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Non-GA100 Ampere and Ada, driver earlier than March 2023&lt;/td>
&lt;td>100 ms&lt;/td>
&lt;td>1 s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Non-GA100 Ampere and Ada, driver 530&lt;/td>
&lt;td>100 ms&lt;/td>
&lt;td>100 ms&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>H100&lt;/strong>&lt;/td>
&lt;td>&lt;strong>100 ms&lt;/strong>&lt;/td>
&lt;td>&lt;strong>25 ms&lt;/strong> with &lt;code>.instant&lt;/code>; &lt;strong>1 s&lt;/strong> with &lt;code>.average&lt;/code> and with the default field&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>GH200&lt;/td>
&lt;td>100 ms&lt;/td>
&lt;td>20 ms on the GPU, 10 ms on the Grace CPU&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Two readings of this table. The first: the driver is an experimental variable, not an infrastructure detail; the averaging window changed between drivers earlier than 530, driver 530, and the later ones. Any measurement meant to be compared over time has to record the driver version.&lt;/p>
&lt;p>The second is the central finding of the paper. On the A100 and H100 the 25 ms window sits inside a 101 ms period, which gives a sensor duty cycle close to 25 %. The sensor does not average the full interval: it averages a quarter of it and the system presents the result as if it described the whole interval. In the words of the work itself, during the other 75 % of the time the GPU may be consuming radically different power and &lt;code>nvidia-smi&lt;/code> never notices.&lt;/p>
&lt;h3 id="the-steady-state-error">The steady-state error&lt;/h3>
&lt;p>The paper also quantifies the claim in the &lt;code>nvidia-smi&lt;/code> documentation, which spoke of an accuracy of ±5 watts: the real error is proportional, ±5 %, not absolute. On a GPU capable of consuming 700 W that is &lt;strong>±35 W&lt;/strong> of over- or underestimation. The errors measured against the external meter, after correcting the time offset, were −4.70 % and −4.53 % on the RTX 3090 and −5.43 % on the A100, and the residue is attributed to the tolerance of the card&amp;rsquo;s own physical shunt, which no software can correct.&lt;/p>
&lt;h3 id="the-response-to-transients">The response to transients&lt;/h3>
&lt;p>Four distinct behaviours were observed in the 10 % to 90 % rise time: an almost instantaneous real rise with the reading following on the next tick and a delay of 0 to 100 ms; a real rise of several hundred milliseconds with the reading still updating on the next tick; linear growth over a second, which corresponds to &lt;code>power.draw.average&lt;/code>; and logarithmic growth over 200 ms, only on Kepler and Maxwell. Out of this comes the most uncomfortable warning in the work: when running a short program, the measured power probably corresponds to the activity before the program.&lt;/p>
&lt;h2 id="the-two-ways-of-obtaining-energy">The two ways of obtaining energy&lt;/h2>
&lt;p>The first is to integrate samples, which is what any &lt;em>poller&lt;/em> does:&lt;/p>
$$E \approx \sum_i P(t_i) \cdot \Delta t$$
&lt;p>It accumulates five sources of error: the ±5 % of the sensor, quadrature error from the finite step, aliasing if the load has spectral content above half the sampling frequency, the fact that each sample is already a moving average, and the jitter of 0 to 100 ms between the host clock and the sensor tick.&lt;/p>
&lt;p>The second is to subtract the counter:&lt;/p>
$$E = \text{counter}(t_1) - \text{counter}(t_0)$$
&lt;p>Two calls and a subtraction. It removes quadrature, aliasing and time misalignment; the ±5 % of the sensor remains.&lt;/p>
&lt;h3 id="why-1-hz-destroys-a-200-ms-inference">Why 1 Hz destroys a 200 ms inference&lt;/h3>
&lt;p>With sampling at 1 Hz, the sampling theorem only allows components below 0.5 Hz to be reconstructed, while a 200 ms pulse has content in the region of 5 Hz. The expected number of samples inside the event is 0.2, so with probability 0.8 none falls inside it: the result is not noisy, it is undefined.&lt;/p>
&lt;p>Even sampling at the maximum useful rate, which on the A100 and H100 is about 10 Hz given the 101 ms period, a 200 ms inference produces one or two distinct sensor updates, and each has observed only 25 ms of real activity: effective coverage is around 25 % of the event. And because of the fourth transient behaviour in the previous section, the reading obtained during those 200 ms may describe what was happening before the kernel was launched.&lt;/p>
&lt;h3 id="aliasing-with-periodic-loads">Aliasing with periodic loads&lt;/h3>
&lt;p>The paper observes the phenomenon directly on the A100: with a square wave of period slightly different from 100 ms, the reading fluctuates between high and low values with a clear beat. An inference server with periodic arrivals, health checks, fixed-size batches or a scheduler tick is exactly that pathological case.&lt;/p>
&lt;p>When only instantaneous power is available, the measured good practice from the Oxford work consists of running 32 consecutive iterations or a minimum of 5 s, inserting &lt;strong>8 evenly spaced controlled delays&lt;/strong> if the window is smaller than the period, repeating over 4 separate trials with a random delay between them, and shifting the series in post-processing to synchronise it with the real activity. Over nine real benchmarks that took the mean error from 39.27 % to 4.89 %.&lt;/p>
&lt;h2 id="what-the-gpu-counter-does-not-measure">What the GPU counter does not measure&lt;/h2>
&lt;p>The scope declared by NVML is the GPU and its associated circuitry: the SXM module or the PCIe card, with its HBM and its regulators. Left out are the CPU, host DRAM, NVSwitch, network cards, storage, fans and power supply losses.&lt;/p>
&lt;p>The measured node figures come from the empirical calibration work on 8× H100 SXM5 nodes (&lt;a href="https://arxiv.org/pdf/2506.14551">arXiv:2506.14551&lt;/a>):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Quantity&lt;/th>
&lt;th>Value&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Nominal node TDP declared by the manufacturer&lt;/td>
&lt;td>10.2 kW&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Node power at idle&lt;/td>
&lt;td>1.8 kW&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Maximum measured under saturating load&lt;/td>
&lt;td>8.4 kW&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Peak on real production loads&lt;/td>
&lt;td>never above 76 % of TDP&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Two conversion factors come out of that, both &lt;strong>my own estimates&lt;/strong> from those figures: 8 × 700 W is 5.6 kW of GPU against 8.4 kW of node, that is, the GPU is of the order of 67 % of node power and the GPU-to-node factor is around 1.50×. Chaining that with an industry average PUE of 1.54 (Uptime Institute, 2025), the total factor from the NVML counter to the utility feed is around 2.3×; with a PUE of 1.1 it drops to 1.65×. Put in the form that matters to whoever signs the bill: the watts NVML reports are roughly 43 % of the watts the utility bills in an average datacenter.&lt;/p>
&lt;p>As a complementary reference, an 80 PLUS Titanium supply at 230 V is 96 % efficient at 50 % load and 91 % at 100 %, so supply losses add between 4 % and 9 % that is already included if you measure at the socket.&lt;/p>
&lt;h2 id="the-tax-of-keeping-a-context-open">The tax of keeping a context open&lt;/h2>
&lt;p>A GPU serving a loaded model with no traffic does not consume its nominal idle. Measurements over 335,267 production samples from 14 H100s across 18 days, plus controlled experiments, give this table:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>GPU&lt;/th>
&lt;th>Idle without a CUDA context&lt;/th>
&lt;th>Idle with a CUDA context&lt;/th>
&lt;th>Extra cost&lt;/th>
&lt;th>Percentage of TDP&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>H100&lt;/td>
&lt;td>71.8 W&lt;/td>
&lt;td>121.7 W&lt;/td>
&lt;td>+49.9 W&lt;/td>
&lt;td>7.1 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>A100&lt;/td>
&lt;td>53.7 W&lt;/td>
&lt;td>80.0 W&lt;/td>
&lt;td>+26.3 W&lt;/td>
&lt;td>8.8 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>L40S&lt;/td>
&lt;td>35.6 W&lt;/td>
&lt;td>102.1 W&lt;/td>
&lt;td>+66.4 W&lt;/td>
&lt;td>19.0 %&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The result that changes the mental model: more than 98 % of that extra cost is produced by the open CUDA context, independently of the memory occupied. Varying allocated VRAM between 0 and 72 GB moves power by less than 1 W. The size of the loaded model does not cost watts; keeping the context open does.&lt;/p>
&lt;p>That cost is not marginal on a real platform. Over 11,791 long-running jobs, the measured split was 24 % of the time and 7 % of the energy in deep idle, 15 % of the time and 10 % of the energy idle with an active context, and 61 % of the time with 83 % of the energy in execution. On &lt;em>serving&lt;/em> loads, GPUs can spend 48 % of their energy in low-activity periods.&lt;/p>
&lt;h2 id="cpu-and-dram-rapl">CPU and DRAM: RAPL&lt;/h2>
&lt;p>To close the node you have to measure what is not GPU, and there the interface is RAPL through the kernel &lt;code>powercap&lt;/code> framework, at &lt;code>/sys/devices/virtual/powercap/intel-rapl/&lt;/code>. The hierarchy exposes &lt;code>intel-rapl:N&lt;/code> as the socket and &lt;code>intel-rapl:N:M&lt;/code> as subzones (core, uncore, dram), plus the &lt;code>psys&lt;/code> domain for the full SoC since Skylake.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>File&lt;/th>
&lt;th>Content&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>energy_uj&lt;/code>&lt;/td>
&lt;td>Energy counter in microjoules; writing &amp;ldquo;0&amp;rdquo; resets it if the counter supports it&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>max_energy_range_uj&lt;/code>&lt;/td>
&lt;td>Counter range, that is, the overflow point&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>power_uw&lt;/code>&lt;/td>
&lt;td>Current power in microwatts&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>name&lt;/code>&lt;/td>
&lt;td>Zone name&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The figures that condition its use come from the characterisation published in ACM TOMPECS: an update roughly every 1 ms, with jitter; an energy quantum of 61 µJ on Haswell and Skylake, 15.3 µJ on Sandy Bridge; and counter overflow in &lt;strong>52 minutes&lt;/strong> on a Haswell at 84 W, which forces polling at a far shorter period and detecting the wrap with &lt;code>max_energy_range_uj&lt;/code>. There is also a &lt;strong>thermal drift&lt;/strong> that is rarely declared: package power for the same load grows between 10 % and 12 % between 37 °C and 74 °C on Haswell. Warming up beforehand is not optional.&lt;/p>
&lt;p>Access, on the other hand, is no longer free. The &lt;strong>PLATYPUS&lt;/strong> attack (IEEE S&amp;amp;P 2021) demonstrated a purely software power side channel through RAPL, with CVE-2020-8694 and CVE-2020-8695 attached. The Linux mitigation arrived in commit &lt;code>949dd0104c49&lt;/code>, included in 5.10.0-rc4, which changed the default permissions so that only root can read &lt;code>energy_uj&lt;/code>. The microcode mitigation associated with SGX goes further and introduces random noise into the reported energy and changes the reporting frequency: on machines with that mitigation active, RAPL readings are deliberately degraded. Measuring CPU and DRAM from a container therefore requires root, a &lt;code>udev&lt;/code> rule relaxing the permissions, or a privileged daemon.&lt;/p>
&lt;h2 id="the-software-stack">The software stack&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Tool&lt;/th>
&lt;th>Source of the GPU figure&lt;/th>
&lt;th>Counter or power&lt;/th>
&lt;th>Default interval&lt;/th>
&lt;th>Overhead&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Zeus&lt;/td>
&lt;td>NVML&lt;/td>
&lt;td>Counter if the architecture is Volta or later; polling otherwise&lt;/td>
&lt;td>Delimited by windows&lt;/td>
&lt;td>Less than 10 ms per call&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dcgm-exporter&lt;/td>
&lt;td>NVML via DCGM&lt;/td>
&lt;td>Both fields available&lt;/td>
&lt;td>&lt;code>collect-interval&lt;/code> = 30,000 ms&lt;/td>
&lt;td>5-10 W extra on the server&amp;rsquo;s IPMI reading&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CodeCarbon&lt;/td>
&lt;td>NVML&lt;/td>
&lt;td>Counter&lt;/td>
&lt;td>&lt;code>measure_power_secs&lt;/code> = 15 s&lt;/td>
&lt;td>5.38 % to 46.75 % of time at 1 kHz&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Scaphandre&lt;/td>
&lt;td>No GPU support; RAPL&lt;/td>
&lt;td>&lt;code>energy_uj&lt;/code> counter&lt;/td>
&lt;td>Not documented&lt;/td>
&lt;td>3.81 % to 28.38 % at 1 kHz&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Kepler&lt;/td>
&lt;td>RAPL and IPMI; GPU only as an experimental option&lt;/td>
&lt;td>Hardware counters&lt;/td>
&lt;td>—&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Four details that change the choice:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Zeus&lt;/strong> decides in code with &lt;code>nvmlDeviceGetArchitecture&lt;/code> and uses the accumulated counter on Volta or later, with a nestable window API (&lt;code>begin_window&lt;/code> / &lt;code>end_window&lt;/code>). It is the reference implementation of what this sheet recommends. Its NSDI'23 paper also documents energy reductions of 23.8 % to 75.7 % from choosing batch size and power limit well, and of 3.0 % to 31.5 % from touching only the limit, with five seconds of profiling per point enough for stable results.&lt;/li>
&lt;li>&lt;strong>Kepler&lt;/strong> has removed eBPF. The CNCF announcement of June 2026 describes the redesign towards reading &lt;code>/proc&lt;/code> and &lt;code>/sys&lt;/code>, motivated by the &lt;code>CAP_BPF&lt;/code> and &lt;code>CAP_SYSADMIN&lt;/code> permissions that blocked deployments, and by the loss of short-lived processes that underestimated the footprint. The new node metric closely follows the IPMI pattern and removes the spurious multi-kilowatt spikes of the previous version. For GPUs it remains &lt;strong>an experimental option&lt;/strong>: today it is not the tool for measuring Wh/token on an accelerator.&lt;/li>
&lt;li>&lt;strong>CodeCarbon&lt;/strong> uses the NVML counter, which is correct, but its RAM estimate is a heuristic of 5 W per module derived from the total gigabytes, and the code itself acknowledges it.&lt;/li>
&lt;li>&lt;strong>DCGM&lt;/strong> delivers profiling metrics at 1 Hz by default, and warns that collecting at higher frequencies returns zeros because it groups metrics internally.&lt;/li>
&lt;/ul>
&lt;p>On the cost of measuring, the empirical overhead study of RAPL-based tools, all forced to 1 kHz, leaves a clear ordering:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Tool&lt;/th>
&lt;th>Time overhead&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>CodeCarbon&lt;/td>
&lt;td>5.38 % to 46.75 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Scaphandre&lt;/td>
&lt;td>3.81 % to 28.38 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Turbostat&lt;/td>
&lt;td>2.73 % to 14.37 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>PowerJoular&lt;/td>
&lt;td>1.67 % to 8.88 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>perf&lt;/td>
&lt;td>−1.00 % to 4.26 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAPL read in user space&lt;/td>
&lt;td>−0.70 % to 2.93 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAPL read in kernel space&lt;/td>
&lt;td>−0.17 % to 0.99 %&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The underlying difference is that a system call costs of the order of 1.36·10⁻³ ms and an &lt;code>rdmsr&lt;/code> instruction between 2.3·10⁻⁴ and 5.6·10⁻⁴ ms, an order of magnitude less. The authors recommend matching the granularity to the phenomenon being measured instead of raising the default frequency, and limiting polling to the necessary domains.&lt;/p>
&lt;h2 id="procedure-for-making-a-whtoken-auditable">Procedure for making a Wh/token auditable&lt;/h2>
&lt;ol>
&lt;li>Fix and record the electrical state. Note &lt;code>EnforcedPowerLimit&lt;/code>, the default limit and the driver version; lock clocks or the power ceiling if the experiment requires it.&lt;/li>
&lt;li>&lt;strong>Warm up to a stable temperature.&lt;/strong> RAPL thermal drift is 10 % to 12 % between 37 °C and 74 °C, and the &lt;code>power.draw.average&lt;/code> transient takes up to a second to settle.&lt;/li>
&lt;li>Measure the idle baseline twice: without a CUDA context and with the model loaded. They are two different values and both are needed.&lt;/li>
&lt;li>Use windows of at least 5 s or 32 consecutive iterations.&lt;/li>
&lt;li>Repeat over 4 separate trials with a random delay, and add 8 evenly spaced delays if you are integrating instantaneous power with a window smaller than the period.&lt;/li>
&lt;li>&lt;strong>Prefer the accumulated counter&lt;/strong> whenever the architecture is Volta or later, watching for driver reloads.&lt;/li>
&lt;li>&lt;strong>Report dispersion.&lt;/strong> The Oxford paper itself publishes the mean and standard deviation of the error; without an interval, a Wh/token figure is not auditable.&lt;/li>
&lt;li>Declare the measurement boundary: GPU, node or utility feed. Without that label, two figures from the same facility differ by a factor of 2.3 with nobody knowing why.&lt;/li>
&lt;/ol>
&lt;h3 id="subtracting-idle-or-not">Subtracting idle, or not&lt;/h3>
&lt;p>There is no consensus, and the honest approach is to treat it as a declared decision. In production the GPU is parked with the model loaded, and that consumption shows up on the bill: subtracting it erases a real cost. To compare the marginal efficiency of two models or two kernels, by contrast, subtracting it isolates the variable. The workable way out is to report &lt;strong>both figures with labels&lt;/strong>: &lt;code>gross Wh/token&lt;/code>, which includes idle and corresponds to the bill, and &lt;code>marginal Wh/token&lt;/code>, comparable between models. What does not work is mixing them in the same table without distinguishing them.&lt;/p>
&lt;p>One estimation trap remains alive in many spreadsheets: multiplying &lt;strong>TDP by time&lt;/strong> overestimates real energy &lt;strong>by up to 4.1 times&lt;/strong>, according to the ML.ENERGY Benchmark.&lt;/p>
&lt;h2 id="power-capping-what-it-costs-and-what-it-saves">Power capping: what it costs and what it saves&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Configuration&lt;/th>
&lt;th>Energy saving&lt;/th>
&lt;th>Performance loss&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>V100 at 200 W against 300 W (67 % of TDP), BERT training&lt;/td>
&lt;td>~15 %&lt;/td>
&lt;td>barely any degradation&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>V100 at 200 W, set of workloads&lt;/td>
&lt;td>10-20 %&lt;/td>
&lt;td>less than 5 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>V100 at 100 W (33 % of TDP)&lt;/td>
&lt;td>40-60 %&lt;/td>
&lt;td>30-40 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>A100 at 175 W against 400 W (44 % of TDP), LLaMA 65B inference&lt;/strong>&lt;/td>
&lt;td>&lt;strong>22-24 %&lt;/strong>&lt;/td>
&lt;td>&lt;strong>5-8 %&lt;/strong>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The asymmetry between phases explains the result. The Microsoft measurement at ASPLOS'24 documents that the &lt;em>prompt&lt;/em> phase is short and reaches or exceeds TDP, while the token generation phase is longer and consumes less: the power ceiling penalises TTFT far more than TPOT. In their production cluster, inference uses 79 % of peak power against 97 % for training, and their measurements show that up to 20 % of power can be recovered with less than a 7 % performance loss.&lt;/p>
&lt;p>The published sweep from 200 W to 700 W on the H100 and H200 adds the nuance of where the knee is: between 500 W and 700 W each 100 W step only contributes around 10 % of performance on compute-bound loads, while the H100 holds peak memory bandwidth even at 200 W. The most stable operating zones identified are 400 W on the H100 and 500 W on the H200. That the memory subsystem is protected against the trim is the physical reason why the decode phase of an LLM, which is memory-bound, loses so little performance under a power ceiling.&lt;/p>
&lt;p>Two warnings about those figures: the H100/H200 sweep was measured with &lt;code>nvidia-smi&lt;/code> polling every 10 s, exactly the problem described above, although on long steady loads the bias averages out; and there is no publication isolating the effect of memory clock locking on Wh/token in LLM inference, so any concrete figure on that point has to be your own measurement.&lt;/p>
&lt;h2 id="reference-figures">Reference figures&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>GPU&lt;/th>
&lt;th>TDP&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>H100 SXM&lt;/td>
&lt;td>up to 700 W, configurable&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>H100 NVL&lt;/td>
&lt;td>350-400 W, configurable&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>A100 80GB SXM&lt;/td>
&lt;td>400 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>A100 80GB PCIe&lt;/td>
&lt;td>300 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RTX 5090&lt;/td>
&lt;td>575 W, with a recommended 1000 W supply&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>HGX node of 8× H100 SXM&lt;/td>
&lt;td>10.2 kW nominal&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Average power measured in inference: on an HPC cluster with vLLM on A100, the aggregate power of the GPU set ranged between 999 W and 2,983 W depending on model and parallelism, with Nemotron 70B on 8× A100 at 2,983 W, about 373 W per GPU, around 93 % of TDP.&lt;/p>
&lt;p>Energy per token, with the warning that published figures measure different boundaries and cannot be mixed without normalising by GPU count and output tokens:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Source&lt;/th>
&lt;th>Figure&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>TokenPowerBench, H100 94 GB&lt;/td>
&lt;td>40 J per token on a standard load, more than 60 J per token in high-throughput configurations&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>TokenPowerBench, batch effect&lt;/td>
&lt;td>−25 % of energy per token between batch 32 and 256 on a 70B model&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>TokenPowerBench, context effect&lt;/td>
&lt;td>from 2K to 10K tokens of context on Llama 3 70B: energy ×3&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>TokenPowerBench, quantisation effect&lt;/td>
&lt;td>Llama 3 405B in FP8 against FP16: −30 % of energy per token&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>TokenPowerBench, engine effect&lt;/td>
&lt;td>TensorRT-LLM and vLLM against the Transformers engine: −25 % to −40 %&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Per-prompt measurement in batch&lt;/td>
&lt;td>0.0074-0.0289 Wh on 7B to 14B models; 0.0835-0.6912 Wh on 70B to 405B; single unbatched requests, between 10 and 100 times more expensive&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="cross-links-from-the-energy-track">Cross-links from the energy track&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/energy-per-token-spain-methodology-electricity-market-speculation/">C2 — Energy per token: methodology and the electricity market&lt;/a>: what to do with the joule once it is measured properly, and how the electricity price multiplies it.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/measuring-energy-in-production-kepler-dcgm-stack/">C3 — Measuring energy in production: Kepler, DCGM and the practical stack&lt;/a>: the continuous deployment of the stack whose metrology this sheet documents.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/ai-energy-benchmarking-frameworks-metrics-state-of-the-art/">C3 — Energy benchmarking: frameworks, metrics and the state of the art&lt;/a>: the full catalogue of tools and their metrics.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/mlperf-power-energy-efficiency-benchmark/">C4 — MLPerf Power&lt;/a>: the certified alternative, measuring at the wall with an external analyser instead of the card&amp;rsquo;s sensor.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/watt-to-carbon-pue-grid-intensity-gco2-per-token/">C6 — From watt to carbon: PUE, grid and grams of CO₂&lt;/a>: the chain that turns the measured watt into emissions and into euros.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/levers-fewer-watts-per-token-llm-inference/">C7 — Energy efficiency levers&lt;/a>: the quantified catalogue where the power ceiling of this sheet is just one more lever.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/gpu-observability-llm-inference-twelve-dcgm-vllm-metrics/">GPU observability for LLM inference: DCGM and vLLM metrics&lt;/a> — the same agent seen from operations, with the metrics that watch health as well as consumption.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/reproducible-harness-cost-performance-energy-experiment/">The reproducible harness: cost, performance and energy in a single auditable experiment&lt;/a> — where this procedure fits inside the bench that measures all three axes at once.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/ai-datacenter-cooling-thermal-challenge/">Cooling the AI datacenter (1/4): the thermal challenge&lt;/a> — what happens to those watts after they turn entirely into heat.&lt;/li>
&lt;/ul>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>NVIDIA, &lt;em>NVML API Reference, Device Queries&lt;/em> — &lt;a href="https://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceQueries.html">https://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceQueries.html&lt;/a>&lt;/li>
&lt;li>NVIDIA, &lt;em>DCGM Library API, Field Identifiers&lt;/em> — &lt;a href="https://docs.nvidia.com/datacenter/dcgm/3.1/dcgm-api/dcgm-api-field-ids.html">https://docs.nvidia.com/datacenter/dcgm/3.1/dcgm-api/dcgm-api-field-ids.html&lt;/a>&lt;/li>
&lt;li>NVIDIA, &lt;em>DCGM Feature Overview&lt;/em> — &lt;a href="https://docs.nvidia.com/datacenter/dcgm/latest/user-guide/feature-overview.html">https://docs.nvidia.com/datacenter/dcgm/latest/user-guide/feature-overview.html&lt;/a>&lt;/li>
&lt;li>NVIDIA, &lt;em>dcgm-exporter&lt;/em> — &lt;a href="https://github.com/NVIDIA/dcgm-exporter">https://github.com/NVIDIA/dcgm-exporter&lt;/a>&lt;/li>
&lt;li>NVIDIA, &lt;em>H100 Tensor Core GPU, especificaciones&lt;/em> — &lt;a href="https://www.nvidia.com/en-us/data-center/h100/">https://www.nvidia.com/en-us/data-center/h100/&lt;/a>&lt;/li>
&lt;li>NVIDIA, &lt;em>A100 Tensor Core GPU, especificaciones&lt;/em> — &lt;a href="https://www.nvidia.com/en-us/data-center/a100/">https://www.nvidia.com/en-us/data-center/a100/&lt;/a>&lt;/li>
&lt;li>NVIDIA, &lt;em>GeForce RTX 5090, especificaciones&lt;/em> — &lt;a href="https://www.nvidia.com/en-us/geforce/graphics-cards/50-series/rtx-5090/">https://www.nvidia.com/en-us/geforce/graphics-cards/50-series/rtx-5090/&lt;/a>&lt;/li>
&lt;li>Yang, Adámek y Armour (Oxford), &lt;em>Part-time Power Measurements: nvidia-smi&amp;rsquo;s Lack of Attention&lt;/em> / SC24 — &lt;a href="https://arxiv.org/html/2312.02741v3">https://arxiv.org/html/2312.02741v3&lt;/a>&lt;/li>
&lt;li>Yang, &lt;em>GPU_Power_Benchmark&lt;/em>, microbenchmark del trabajo anterior — &lt;a href="https://github.com/JimZeyuYang/GPU_Power_Benchmark">https://github.com/JimZeyuYang/GPU_Power_Benchmark&lt;/a>&lt;/li>
&lt;li>ML.ENERGY, &lt;em>Measuring GPU Energy: Best Practices&lt;/em> — &lt;a href="https://ml.energy/blog/energy/measurement/measuring-gpu-energy-best-practices/">https://ml.energy/blog/energy/measurement/measuring-gpu-energy-best-practices/&lt;/a>&lt;/li>
&lt;li>You et al., &lt;em>Zeus: Understanding and Optimizing GPU Energy Consumption of DNN Training&lt;/em>, 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>Zeus, &lt;em>Measuring Energy&lt;/em> — &lt;a href="https://ml.energy/zeus/measure/">https://ml.energy/zeus/measure/&lt;/a>&lt;/li>
&lt;li>ML.ENERGY, &lt;em>The ML.ENERGY Benchmark&lt;/em> — &lt;a href="https://arxiv.org/html/2505.06371v1">https://arxiv.org/html/2505.06371v1&lt;/a>&lt;/li>
&lt;li>CNCF, &lt;em>Kepler, re-architected: improved power accuracy&lt;/em> (junio 2026) — &lt;a href="https://www.cncf.io/blog/2026/06/30/kepler-re-architected-improved-power-accuracy-and-a-community-call-to-action/">https://www.cncf.io/blog/2026/06/30/kepler-re-architected-improved-power-accuracy-and-a-community-call-to-action/&lt;/a>&lt;/li>
&lt;li>CodeCarbon, &lt;em>How Power Estimation Works&lt;/em> — &lt;a href="https://docs.codecarbon.io/latest/explanation/power-estimation/">https://docs.codecarbon.io/latest/explanation/power-estimation/&lt;/a>&lt;/li>
&lt;li>Hubblo, &lt;em>Scaphandre: cálculo del consumo por proceso&lt;/em> — &lt;a href="https://github.com/hubblo-org/scaphandre/blob/main/docs_src/explanations/how-scaph-computes-per-process-power-consumption.md">https://github.com/hubblo-org/scaphandre/blob/main/docs_src/explanations/how-scaph-computes-per-process-power-consumption.md&lt;/a>&lt;/li>
&lt;li>Linux Kernel, &lt;em>Power Capping Framework (powercap sysfs)&lt;/em> — &lt;a href="https://docs.kernel.org/power/powercap/powercap.html">https://docs.kernel.org/power/powercap/powercap.html&lt;/a>&lt;/li>
&lt;li>Intel, &lt;em>Running Average Power Limit Energy Reporting, INTEL-SA-00389&lt;/em> — &lt;a href="https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/running-average-power-limit-energy-reporting.html">https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/running-average-power-limit-energy-reporting.html&lt;/a>&lt;/li>
&lt;li>Lipp et al., &lt;em>PLATYPUS: With Great Power comes Great Leakage&lt;/em>, IEEE S&amp;amp;P 2021 — &lt;a href="https://platypusattack.com/">https://platypusattack.com/&lt;/a>&lt;/li>
&lt;li>Khan et al., &lt;em>RAPL in Action: Experiences in Using RAPL for Power Measurements&lt;/em>, ACM TOMPECS — &lt;a href="https://www.devsustainability.com/p/paper-notes-rapl-in-action">https://www.devsustainability.com/p/paper-notes-rapl-in-action&lt;/a>&lt;/li>
&lt;li>&lt;em>What Is the Cost of Energy Monitoring? An Empirical Study on the Overhead of RAPL-Based Tools&lt;/em> — &lt;a href="https://arxiv.org/html/2604.26815v1">https://arxiv.org/html/2604.26815v1&lt;/a>&lt;/li>
&lt;li>Patel et al. (Microsoft), &lt;em>Characterizing Power Management Opportunities for LLMs in the Cloud&lt;/em>, ASPLOS'24 — &lt;a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2024/03/GPU_Power_ASPLOS_24.pdf">https://www.microsoft.com/en-us/research/wp-content/uploads/2024/03/GPU_Power_ASPLOS_24.pdf&lt;/a>&lt;/li>
&lt;li>MIT Lincoln Laboratory, &lt;em>Sustainable Supercomputing for AI: GPU Power Capping at HPC Scale&lt;/em> — &lt;a href="https://arxiv.org/html/2402.18593">https://arxiv.org/html/2402.18593&lt;/a>&lt;/li>
&lt;li>&lt;em>Architectural Trade-offs in the Energy-Efficient Era: power-capping NVIDIA H100 and H200&lt;/em> — &lt;a href="https://arxiv.org/html/2604.11391v1">https://arxiv.org/html/2604.11391v1&lt;/a>&lt;/li>
&lt;li>&lt;em>Empirically-Calibrated H100 Node Power Models for Datacenter Energy Analysis&lt;/em> — &lt;a href="https://arxiv.org/pdf/2506.14551">https://arxiv.org/pdf/2506.14551&lt;/a>&lt;/li>
&lt;li>&lt;em>The Model Parking Tax: Quantifying the Hidden Energy Cost of Always-On GPU Model Deployment&lt;/em> — &lt;a href="https://arxiv.org/html/2605.23918">https://arxiv.org/html/2605.23918&lt;/a>&lt;/li>
&lt;li>&lt;em>The Energy Cost of Execution-Idle in GPU Clusters&lt;/em> — &lt;a href="https://arxiv.org/html/2604.04745">https://arxiv.org/html/2604.04745&lt;/a>&lt;/li>
&lt;li>&lt;em>TokenPowerBench: Benchmarking the Power Consumption of LLM Inference&lt;/em> — &lt;a href="https://arxiv.org/pdf/2512.03024">https://arxiv.org/pdf/2512.03024&lt;/a>&lt;/li>
&lt;li>&lt;em>From Prompts to Power: Measuring the Energy Footprint of LLM Inference&lt;/em> — &lt;a href="https://arxiv.org/html/2511.05597">https://arxiv.org/html/2511.05597&lt;/a>&lt;/li>
&lt;li>&lt;em>Serving LLMs in HPC Clusters&lt;/em> — &lt;a href="https://arxiv.org/abs/2507.00418">https://arxiv.org/abs/2507.00418&lt;/a>&lt;/li>
&lt;li>Uptime Institute, &lt;em>Global Data Center Survey 2025&lt;/em> — &lt;a href="https://datacenter.uptimeinstitute.com/rs/711-RIA-145/images/2025.Annual.Survey.Report.pdf">https://datacenter.uptimeinstitute.com/rs/711-RIA-145/images/2025.Annual.Survey.Report.pdf&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Levers for spending fewer watts per token: a quantified catalogue for LLM inference</title><link>https://blog.lo0.es/en/posts/levers-fewer-watts-per-token-llm-inference/</link><pubDate>Tue, 16 Jun 2026 09:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/levers-fewer-watts-per-token-llm-inference/</guid><description>&lt;blockquote>
&lt;p>Notation: amounts in &lt;strong>euros (N €)&lt;/strong>, decimals with a point. The dollar symbol is not used
(on this site it is a formula delimiter).&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>Seven independent levers act on the numerator or the denominator of the identity
\(\text{J/token} = \text{power (W)} / \text{throughput (tok/s)}\). Applied in order of
cost-benefit: &lt;strong>quantisation&lt;/strong> (FP16→FP8) cuts J/token by 30–50% without changing hardware;
&lt;strong>power capping&lt;/strong> to 70% of TDP reduces power by 30% with less than a 10% drop in
throughput on memory-bound loads; &lt;strong>DVFS&lt;/strong> in the decode phase saves a further 22–45%;
&lt;strong>continuous batching&lt;/strong> lowers J/token by 25–40% against unoptimised stacks; &lt;strong>speculative
decoding&lt;/strong> trims up to 29% off J/token at low batch; &lt;strong>prefix caching&lt;/strong> eliminates the
prefill recompute for repeated prompts; and &lt;strong>scheduling to clean hours&lt;/strong> shifts the
carbon footprint without changing physical consumption. Starting reference: a vLLM FP16 stack on an H100
SXM (700 W TDP) with Llama-3 70B produces ~0.39 J/token under realistic batch loads; an
unoptimised stack (PyTorch baseline) starts 2–6× higher. The levers stack; the combined effect
can reach a 73% reduction against the unoptimised baseline
(&lt;a href="https://arxiv.org/pdf/2504.17674">arXiv 2504.17674&lt;/a>).&lt;/p>
&lt;hr>
&lt;h2 id="the-reference-identity">The reference identity&lt;/h2>
$$\text{J/token} = \frac{\overline{P}\ [\text{W}]}{\text{throughput}\ [\text{tok/s}]}$$
&lt;p>where \(\overline{P}\) is the average power over the measurement window (see the methodology in
&lt;a href="https://blog.lo0.es/en/posts/energy-per-token-spain-methodology-electricity-market-speculation/">energy per token&lt;/a>). The levers act on one
of the two factors:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>They reduce \(\overline{P}\)&lt;/strong>: power capping, DVFS, scheduling to low-intensity hours.&lt;/li>
&lt;li>&lt;strong>They raise throughput&lt;/strong> (the denominator): quantisation, continuous batching, speculative decoding,
prefix caching, chunked prefill, model selection.&lt;/li>
&lt;li>&lt;strong>Both at once&lt;/strong>: quantisation (smaller weight footprint → a larger batch fits in VRAM → higher
throughput at similar or lower power).&lt;/li>
&lt;/ul>
&lt;p>The expanded formula including infrastructure overhead:&lt;/p>
$$\text{J/token}_{\text{effective}} = \frac{\overline{P}_{\text{GPU}} + \overline{P}_{\text{rest of node}}}{\text{throughput}_{\text{tok/s}}} \times \text{PUE}$$
&lt;p>For the lever calculations the work is done on \(\overline{P}_{\text{GPU}}\) for clarity; the
PUE factor (see &lt;a href="https://blog.lo0.es/en/posts/energy-per-token-spain-methodology-electricity-market-speculation/">energy per token&lt;/a>) amplifies or
attenuates the effect of each lever proportionally.&lt;/p>
&lt;hr>
&lt;h2 id="master-table-levers--impact--cost--tool">Master table: levers × impact × cost × tool&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Lever&lt;/th>
&lt;th>J/token reduction (%)&lt;/th>
&lt;th>Effect on latency&lt;/th>
&lt;th>Effect on quality&lt;/th>
&lt;th>Main OSS tool&lt;/th>
&lt;th>Source&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Quantisation FP16→FP8&lt;/td>
&lt;td>&lt;strong>30–50%&lt;/strong>&lt;/td>
&lt;td>−8–33% TPOT (improvement)&lt;/td>
&lt;td>&amp;lt;1% degradation on benchmarks&lt;/td>
&lt;td>vLLM, TRT-LLM, llm-compressor&lt;/td>
&lt;td>arXiv 2504.17674, baseten.co&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Quantisation FP16→INT4 (AWQ/GPTQ)&lt;/td>
&lt;td>&lt;strong>45–60%&lt;/strong>&lt;/td>
&lt;td>latency improves (lower BW)&lt;/td>
&lt;td>1–3% degradation depending on model&lt;/td>
&lt;td>AutoAWQ, llm-compressor, vLLM&lt;/td>
&lt;td>arXiv 2504.17674&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Continuous vs static batching&lt;/td>
&lt;td>&lt;strong>25–40%&lt;/strong> vs PyTorch&lt;/td>
&lt;td>+5× throughput (improvement)&lt;/td>
&lt;td>no impact&lt;/td>
&lt;td>vLLM, TGI, TRT-LLM&lt;/td>
&lt;td>arXiv 2504.17674, TokenPowerBench&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Power capping 70% TDP&lt;/td>
&lt;td>&lt;strong>20–30%&lt;/strong> power&lt;/td>
&lt;td>&amp;lt;10% throughput (decode)&lt;/td>
&lt;td>no impact&lt;/td>
&lt;td>nvidia-smi, DCGM, Zeus&lt;/td>
&lt;td>arXiv 2604.11391, NERSC docs&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DVFS decode-phase&lt;/td>
&lt;td>&lt;strong>22–45%&lt;/strong> in decode&lt;/td>
&lt;td>1–6% total latency&lt;/td>
&lt;td>no impact&lt;/td>
&lt;td>nvidia-smi, GreenLLM, DVFS-GPT&lt;/td>
&lt;td>arXiv 2501.08219, HAL 05190051&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Speculative decoding&lt;/td>
&lt;td>&lt;strong>up to 29%&lt;/strong> (batch≤16)&lt;/td>
&lt;td>TTFT improves&lt;/td>
&lt;td>no demonstrable impact&lt;/td>
&lt;td>vLLM, TRT-LLM&lt;/td>
&lt;td>arXiv 2602.09113&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Prefix caching&lt;/td>
&lt;td>&lt;strong>50–90%&lt;/strong> on reusable prefill&lt;/td>
&lt;td>TTFT −50–80% (repeated prompts)&lt;/td>
&lt;td>no impact&lt;/td>
&lt;td>vLLM, SGLang&lt;/td>
&lt;td>vLLM docs&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Chunked prefill&lt;/td>
&lt;td>~10–15% on mixed loads&lt;/td>
&lt;td>more stable TTFT&lt;/td>
&lt;td>no impact&lt;/td>
&lt;td>vLLM (SARATHI)&lt;/td>
&lt;td>arXiv 2308.16369&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>SLM vs dense LLM selection&lt;/td>
&lt;td>&lt;strong>60–80%&lt;/strong> (7B vs 70B model)&lt;/td>
&lt;td>low latency&lt;/td>
&lt;td>degradation varies by task&lt;/td>
&lt;td>Ollama, vLLM, llama.cpp&lt;/td>
&lt;td>arXiv 2504.17674&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Scheduling to clean hours&lt;/td>
&lt;td>0% J/token, up to −70% CO₂&lt;/td>
&lt;td>no impact on the load&lt;/td>
&lt;td>no impact&lt;/td>
&lt;td>Kueue, Volcano, cron&lt;/td>
&lt;td>ACM SLIT, arXiv 2507.09942&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>Note: the percentages are against the effective J/token of the load, not against idle board
power. The effects are always measured under conditions of equal output quality (same model,
same serving stack, same prompt distribution).&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;h2 id="lever-1-quantisation">Lever 1: quantisation&lt;/h2>
&lt;h3 id="mechanics">Mechanics&lt;/h3>
&lt;p>Quantisation reduces the numerical precision of the weights (and optionally the activations),
which shortens the time spent reading weights from HBM per generated token. Decode is
memory-bandwidth-bound: the bottleneck is reading the weights, not computing. Reducing bit width
frees bandwidth for higher throughput or allows a larger batch in VRAM.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Format&lt;/th>
&lt;th>Bits/weight&lt;/th>
&lt;th>BW reduction vs FP32&lt;/th>
&lt;th>J/token vs FP16&lt;/th>
&lt;th>Tool&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>FP32&lt;/td>
&lt;td>32&lt;/td>
&lt;td>1× (reference)&lt;/td>
&lt;td>+100% (worse)&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>BF16/FP16&lt;/td>
&lt;td>16&lt;/td>
&lt;td>2×&lt;/td>
&lt;td>reference&lt;/td>
&lt;td>vLLM native&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>FP8 (W8A8)&lt;/td>
&lt;td>8&lt;/td>
&lt;td>~4×&lt;/td>
&lt;td>&lt;strong>−30–50%&lt;/strong>&lt;/td>
&lt;td>vLLM, TRT-LLM, llm-compressor&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>INT4 AWQ (W4A16)&lt;/td>
&lt;td>4&lt;/td>
&lt;td>~8×&lt;/td>
&lt;td>&lt;strong>−45–60%&lt;/strong>&lt;/td>
&lt;td>AutoAWQ, llm-compressor&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>INT4 GPTQ (W4A16)&lt;/td>
&lt;td>4&lt;/td>
&lt;td>~8×&lt;/td>
&lt;td>&lt;strong>−40–55%&lt;/strong>&lt;/td>
&lt;td>AutoGPTQ, vLLM&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Concrete reference figures:&lt;/p>
&lt;ul>
&lt;li>Llama-3 405B on H100, FP16→FP8: −30% J/token measured; TPOT improves by 33% (Baseten,
&lt;a href="https://www.baseten.co/blog/33-faster-llm-inference-with-fp8-quantization/">baseten.co/blog/33-faster-llm-inference-with-fp8-quantization&lt;/a>).&lt;/li>
&lt;li>The vLLM+CUDA graphs stack vs the PyTorch baseline: 2–6× more efficient in J/token
(&lt;a href="https://arxiv.org/pdf/2504.17674">arXiv 2504.17674&lt;/a>).&lt;/li>
&lt;li>Llama-65B on V100 FP16: 3–4 J/token. Llama-3 70B on H100 FP8: 0.39 J/token. Combined
hardware+quantisation reduction: ~90%
(&lt;a href="https://mlcommons.org/2025/09/mlperf-inference-v5-1-results/">MLCommons, arXiv 2504.17674&lt;/a>).&lt;/li>
&lt;/ul>
&lt;h3 id="quality-cost">Quality cost&lt;/h3>
&lt;p>FP8 quantisation with calibration produces &amp;lt;1% degradation on standard benchmarks (MMLU,
HumanEval). INT4 AWQ can produce 1–3% degradation depending on the model and the task;
INT4 GPTQ without fine calibration, up to 2–5%. Validate with &lt;a href="https://blog.lo0.es/en/posts/llm-energy-leaderboards-wh-per-token/">LLM energy leaderboards&lt;/a> and your own quality benchmarks.&lt;/p>
&lt;h3 id="oss-tooling">OSS tooling&lt;/h3>
&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"># vLLM with FP8 (load-time quantisation, H100/A100)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vllm serve meta-llama/Llama-3-70B-Instruct &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --quantization fp8 &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --dtype auto
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># llm-compressor: offline quantisation to W4A16 (AWQ)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">python -m llmcompressor.transformers.compression.helpers &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --model meta-llama/Llama-3-70B-Instruct &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --recipe w4a16_awq.yaml &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --output-dir llama-70b-w4a16/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="lever-2-continuous-batching">Lever 2: continuous batching&lt;/h2>
&lt;h3 id="mechanics-1">Mechanics&lt;/h3>
&lt;p>Static batching keeps the batch fixed: if one request finishes early, the slot stays
empty until the end of the batch. &lt;strong>Continuous batching&lt;/strong> inserts new requests as
soon as a slot frees up, keeping the GPU always at the highest possible utilisation.&lt;/p>
&lt;p>The energy effect: GPU power is almost constant (the GPU is always active); the
throughput grows. The result is a larger denominator at similar power:&lt;/p>
$$\text{J/token}_{\text{continuous batch}} = \frac{\overline{P}}{\text{throughput}_{\uparrow}}$$
&lt;p>Measured figures (&lt;a href="https://arxiv.org/pdf/2504.17674">arXiv 2504.17674&lt;/a>,
&lt;a href="https://arxiv.org/pdf/2512.03024">TokenPowerBench arXiv 2512.03024&lt;/a>):&lt;/p>
&lt;ul>
&lt;li>vLLM with PagedAttention vs unoptimised Transformers: −25–40% J/token on high
batch loads.&lt;/li>
&lt;li>Online continuous batching vs static offline: a further −5% of J/token (small but
consistent).&lt;/li>
&lt;li>Batch 32→256 tokens: −25% J/token on Llama-3 70B (kernel economies of scale).&lt;/li>
&lt;li>Throughput: ×5 against static batching stacks at equivalent load.&lt;/li>
&lt;/ul>
&lt;p>The efficiency knee on the H100 sits at around 256–512 tokens of batch; beyond that,
J/token flattens or rises slightly.&lt;/p>
&lt;h3 id="oss-tooling-1">OSS tooling&lt;/h3>
&lt;p>vLLM, TGI (HuggingFace Text Generation Inference), TRT-LLM. The relevant flag in vLLM:
&lt;code>--max-num-seqs&lt;/code> (maximum concurrent sequences); tuning it to the available VRAM
maximises the effective batch.&lt;/p>
&lt;hr>
&lt;h2 id="lever-3-power-capping">Lever 3: power capping&lt;/h2>
&lt;h3 id="mechanics-2">Mechanics&lt;/h3>
&lt;p>The power cap sets a ceiling on instantaneous power (W). The GPU respects it by cutting the
clock (internal DVFS). The efficiency trick: LLM decode is &lt;strong>memory-bandwidth-bound&lt;/strong>; the
GPU is already not at usefully full clock, and lowering the TDP reduces power without degrading
throughput proportionally.&lt;/p>
&lt;h3 id="the-power-cap-vs-throughput-curve-h100-sxm">The power cap vs throughput curve (H100 SXM)&lt;/h3>
&lt;p>Figures from (&lt;a href="https://arxiv.org/html/2604.11391v1">arXiv 2604.11391&lt;/a>) and NERSC
(&lt;a href="https://docs.nersc.gov/jobs/power-capping/">docs.nersc.gov/jobs/power-capping&lt;/a>):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Power cap (W)&lt;/th>
&lt;th>% of TDP (700 W)&lt;/th>
&lt;th>Relative throughput (memory-bound)&lt;/th>
&lt;th>Efficiency (tok/W)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>700 W&lt;/td>
&lt;td>100%&lt;/td>
&lt;td>100%&lt;/td>
&lt;td>1.00×&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>560 W&lt;/td>
&lt;td>80%&lt;/td>
&lt;td>~95%&lt;/td>
&lt;td>~1.19×&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>490 W&lt;/strong>&lt;/td>
&lt;td>&lt;strong>70%&lt;/strong>&lt;/td>
&lt;td>&lt;strong>~90–95%&lt;/strong>&lt;/td>
&lt;td>&lt;strong>~1.27×&lt;/strong> (sweet spot)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>420 W&lt;/td>
&lt;td>60%&lt;/td>
&lt;td>~80–85%&lt;/td>
&lt;td>~1.33× (latency rises)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>350 W&lt;/td>
&lt;td>50%&lt;/td>
&lt;td>~75% (the H100 reaches maximum BW at 350 W memory-bound)&lt;/td>
&lt;td>~1.50×&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>200 W&lt;/td>
&lt;td>29%&lt;/td>
&lt;td>~50%&lt;/td>
&lt;td>frequency saturation&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Key finding from &lt;a href="https://arxiv.org/html/2604.11391v1">arXiv 2604.11391&lt;/a>: &lt;strong>the H100 reaches
its maximum effective memory bandwidth with only ~350 W&lt;/strong> on memory-bound loads
(STriad benchmark), against a TDP of 700 W. Going from 700 W to 490 W (−30% power) produces
less than a 10% drop in decode throughput: J/token improves by ~20–27%.&lt;/p>
&lt;p>For compute-bound loads (heavy prefill), the sweet spot shifts to 400–500 W, where
performance scales almost linearly with the cap; from 500 W to 700 W, the gain is only
~10% extra throughput for each additional 100 W.&lt;/p>
&lt;h3 id="jtoken-formula-with-a-power-cap">J/token formula with a power cap&lt;/h3>
$$\text{J/token}(P_{\text{cap}}) = \frac{P_{\text{cap}} \times \eta(P_{\text{cap}})}{\text{throughput}_{\text{base}} \times f(P_{\text{cap}})}$$
&lt;p>where \(\eta(P_{\text{cap}})\) is the fraction of power actually consumed under the
cap (on memory-bound loads, the GPU no longer consumes the whole cap), and \(f(P_{\text{cap}})\) is
the resulting fraction of throughput. In the H100&amp;rsquo;s 490–560 W zone,
\(\eta \approx 0{.}9\) and \(f \approx 0{.}92\text{–}0{.}95\): the numerator falls more than the
denominator, so J/token improves.&lt;/p>
&lt;h3 id="commands">Commands&lt;/h3>
&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"># Set the power cap to 490 W on GPU 0 (H100 SXM, 700 W TDP)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo nvidia-smi -i &lt;span class="m">0&lt;/span> -pl &lt;span class="m">490&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Check the applied limit and the power draw in real time&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">nvidia-smi --query-gpu&lt;span class="o">=&lt;/span>power.limit,power.draw --format&lt;span class="o">=&lt;/span>csv -l &lt;span class="m">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># With DCGM: read DCGM_FI_DEV_POWER_USAGE in Prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># and DCGM_FI_DEV_POWER_LIMIT to confirm the cap is active&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&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"># Apply the cap to every GPU on the node (systemd/cron script)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">for&lt;/span> i in &lt;span class="k">$(&lt;/span>seq &lt;span class="m">0&lt;/span> 3&lt;span class="k">)&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="k">do&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> sudo nvidia-smi -i &lt;span class="nv">$i&lt;/span> -pl &lt;span class="m">490&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">done&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With DCGM in production, the cap can be set via
&lt;code>dcgmi policy --set powercap:490&lt;/code> or through the NVIDIA GPU Operator (the
&lt;code>powerLimit&lt;/code> field in the DevicePlugin). Zeus (&lt;a href="https://ml.energy/zeus/">ml.energy/zeus&lt;/a>)
can sweep caps automatically and measure the resulting J/token per configuration.&lt;/p>
&lt;hr>
&lt;h2 id="lever-4-dvfs-dynamic-voltage-and-frequency-scaling">Lever 4: DVFS (Dynamic Voltage and Frequency Scaling)&lt;/h2>
&lt;h3 id="mechanics-3">Mechanics&lt;/h3>
&lt;p>DVFS is finer-grained than a power cap: it allows the SM frequency to be set directly
(&lt;code>nvidia-smi -lgc&lt;/code> to lock the GPU clock) or left for the driver to adjust dynamically
according to available power and load. In LLM inference, the asymmetry between phases
is the key fact:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Prefill&lt;/strong>: compute-bound. Benefits from maximum clock. Sensitive to frequency reduction.&lt;/li>
&lt;li>&lt;strong>Decode&lt;/strong>: memory-bandwidth-bound. The SM clock barely matters; what rules is
HBM bandwidth.&lt;/li>
&lt;/ul>
&lt;p>This asymmetry is what LLM-specific DVFS systems exploit:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>System&lt;/th>
&lt;th>Energy saving&lt;/th>
&lt;th>Latency penalty&lt;/th>
&lt;th>Hardware&lt;/th>
&lt;th>Source&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>DVFS-GPT (HAL)&lt;/td>
&lt;td>up to &lt;strong>32%&lt;/strong> at iso-latency&lt;/td>
&lt;td>~1–2%&lt;/td>
&lt;td>A100, RTX 4090&lt;/td>
&lt;td>HAL 05190051&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>EcoInfer&lt;/td>
&lt;td>up to &lt;strong>25.4%&lt;/strong> (average 21.5%)&lt;/td>
&lt;td>&amp;lt;5%&lt;/td>
&lt;td>A100&lt;/td>
&lt;td>arXiv MDPI Electronics&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DualScale (disaggregated prefill/decode)&lt;/td>
&lt;td>&lt;strong>22–45%&lt;/strong> with SLO&lt;/td>
&lt;td>1–6%&lt;/td>
&lt;td>H100&lt;/td>
&lt;td>arXiv 2602.18755&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>GreenLLM (SLO-aware DVFS)&lt;/td>
&lt;td>&lt;strong>18–30%&lt;/strong>&lt;/td>
&lt;td>within the SLO&lt;/td>
&lt;td>—&lt;/td>
&lt;td>arXiv 2508.16449&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The paper &lt;a href="https://arxiv.org/abs/2501.08219">arXiv 2501.08219&lt;/a> measures that reducing the
GPU frequency from 2,842 MHz to 180 MHz achieves an average saving of 42% with only a 1–6%
latency increase in the decode phase, because decode is memory-bound and the SM
frequency is not the bottleneck.&lt;/p>
&lt;h3 id="commands-manual-dvfs">Commands (manual DVFS)&lt;/h3>
&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"># Lock the SM clock at 1,200 MHz (H100 boost: 1,980 MHz) for decode&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo nvidia-smi -i &lt;span class="m">0&lt;/span> -lgc 1200,1200
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Restore the dynamic clock&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo nvidia-smi -i &lt;span class="m">0&lt;/span> -rgc
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Persistent mode (needed for the lock to survive between jobs)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">sudo nvidia-smi -pm &lt;span class="m">1&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For automatic DVFS tuned to the SLO (target TPOT), systems such as GreenLLM or
DVFS-GPT measure the time of each iteration and adjust the frequency in real time, without
overrunning the latency budget.&lt;/p>
&lt;hr>
&lt;h2 id="lever-5-model-selection-slm-moe-vs-dense">Lever 5: model selection (SLM, MoE vs dense)&lt;/h2>
&lt;h3 id="the-effect-of-scale">The effect of scale&lt;/h3>
&lt;p>J/token scales with model size, but sublinearly. For Llama-3
(&lt;a href="https://arxiv.org/pdf/2504.17674">arXiv 2504.17674&lt;/a>):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Model&lt;/th>
&lt;th>Parameters&lt;/th>
&lt;th>Relative J/token&lt;/th>
&lt;th>Factor vs 1B&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Llama-3 1B&lt;/td>
&lt;td>1B&lt;/td>
&lt;td>1.0×&lt;/td>
&lt;td>reference&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama-3 8B&lt;/td>
&lt;td>8B&lt;/td>
&lt;td>~2.3×&lt;/td>
&lt;td>×2.3 (not ×8)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama-3 70B&lt;/td>
&lt;td>70B&lt;/td>
&lt;td>~7.3×&lt;/td>
&lt;td>×7.3 (not ×70)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama-3 405B&lt;/td>
&lt;td>405B&lt;/td>
&lt;td>~40×&lt;/td>
&lt;td>×40 (not ×405)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>J/token grows ~7.3× from 1B to 70B, while parameters grow ×70: hardware
efficiency (caches, tensor parallelism, kernels) cushions the scaling.
Even so, moving from 70B to 8B cuts J/token by ~68% if the quality is sufficient for
the task.&lt;/p>
&lt;h3 id="moe-vs-dense">MoE vs dense&lt;/h3>
&lt;p>MoE models activate only a subset of experts per token (typically 2 of 8–64), which
reduces active compute. But there is an implementation trap:&lt;/p>
&lt;ul>
&lt;li>OLMoE-1B-7B (MoE, 1B active) vs OLMo-1B (dense): the MoE consumes &lt;strong>54.24% more&lt;/strong>
energy per token than the dense model of the same active size
(&lt;a href="https://arxiv.org/pdf/2504.17674">arXiv 2504.17674&lt;/a>), because the fused expert
kernels are ~19–63% slower than an equivalent dense GEMM.&lt;/li>
&lt;li>OLMoE-1B-7B vs OLMo-7B (dense): here the MoE is indeed more efficient (7B active → only 1B
active, a ~7× reduction in active FLOPs per token).&lt;/li>
&lt;/ul>
&lt;p>The rule: MoE is efficient when the comparison is &lt;strong>equal total parameters, fewer
active&lt;/strong> (for example Mixtral 8×7B vs dense Llama-3 70B). It is not efficient when the comparison
is &lt;strong>equal active parameters&lt;/strong> per token.&lt;/p>
&lt;h3 id="model-selection-table-by-use-case">Model selection table by use case&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Use case&lt;/th>
&lt;th>Recommended model&lt;/th>
&lt;th>Efficiency rationale&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Simple chat, entity extraction&lt;/td>
&lt;td>SLM 7–8B FP8&lt;/td>
&lt;td>−68% J/token vs 70B&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RAG with long contexts&lt;/td>
&lt;td>70B FP8 or MoE 8×7B&lt;/td>
&lt;td>optimal quality/J at K&amp;gt;2K tokens&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Complex code, reasoning&lt;/td>
&lt;td>70B FP8 or 405B INT4&lt;/td>
&lt;td>quality is non-negotiable&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Classification, embeddings&lt;/td>
&lt;td>dedicated model (e.g. E5, BGE)&lt;/td>
&lt;td>orders of magnitude less J&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Deferrable offline batch&lt;/td>
&lt;td>large MoE (DeepSeek, Mixtral)&lt;/td>
&lt;td>high quality, batch throughput&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h2 id="lever-6-speculative-decoding">Lever 6: speculative decoding&lt;/h2>
&lt;h3 id="mechanics-4">Mechanics&lt;/h3>
&lt;p>Speculative decoding uses a small draft model to propose several
tokens, which the target model verifies in parallel in a single forward pass. If the tokens
are accepted, K tokens are generated per step instead of 1: potentially K× throughput.&lt;/p>
&lt;h3 id="the-energy-efficiency-condition">The energy efficiency condition&lt;/h3>
&lt;p>The J/token benefit &lt;strong>depends on batch size&lt;/strong> (&lt;a href="https://arxiv.org/pdf/2602.09113">arXiv 2602.09113&lt;/a>):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Batch size&lt;/th>
&lt;th>Effect on J/token&lt;/th>
&lt;th>Reason&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1–16 (low batch)&lt;/td>
&lt;td>&lt;strong>−up to 29%&lt;/strong>&lt;/td>
&lt;td>the draft model fills the waiting time; verification is cheap&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>32–64 (medium batch)&lt;/td>
&lt;td>~0% (neutral)&lt;/td>
&lt;td>verification overhead cancels out the gain&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>128+ (high batch)&lt;/td>
&lt;td>&lt;strong>+25%&lt;/strong> (worse)&lt;/td>
&lt;td>GPU saturated; the draft model adds overhead without saving&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Conclusion: speculative decoding is a J/token lever only in a &lt;strong>low-latency regime
(batch≤16)&lt;/strong>; in high-throughput serving it is counterproductive in J/token terms
(although it reduces TPOT latency).&lt;/p>
&lt;h3 id="oss-tooling-2">OSS tooling&lt;/h3>
&lt;p>vLLM supports speculative decoding with &lt;code>--speculative-model&lt;/code> and &lt;code>--num-speculative-tokens&lt;/code>.
TRT-LLM does too. The draft model must come from the same family (for example Llama-3 8B as
draft for Llama-3 70B).&lt;/p>
&lt;hr>
&lt;h2 id="lever-7-prefix-caching-and-chunked-prefill">Lever 7: prefix caching and chunked prefill&lt;/h2>
&lt;h3 id="prefix-caching">Prefix caching&lt;/h3>
&lt;p>The prefill KV-cache of a shared prompt (system prompt, few-shot examples, document
context) is identical across requests. Storing and reusing it eliminates the prefill
recompute for that fraction of the prompt.&lt;/p>
&lt;p>Energy impact: prefill is compute-bound and draws power spikes. Removing the
repeated prefill removes those spikes. In scenarios with a fixed 1,000-token system prompt
and 200-token user prompts, the saving is ~1,000/(1,000+200) = &lt;strong>~83% of prefill
energy&lt;/strong>. In total J/token, the effect depends on the length of the shared prompt against
the generation length.&lt;/p>
&lt;p>Enabling it in vLLM:&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">vllm serve meta-llama/Llama-3-70B-Instruct &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --enable-prefix-caching &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --max-num-seqs &lt;span class="m">256&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="chunked-prefill-sarathi">Chunked prefill (SARATHI)&lt;/h3>
&lt;p>Chunked prefill splits the prefill into fixed-size chunks and processes each chunk together with
decode tokens from other requests. The benefit: the prefill of a long prompt no longer
blocks the decode of other requests (reducing TPOT spikes), which allows higher
GPU utilisation over time.&lt;/p>
&lt;p>In terms of total J/token, chunked prefill reduces the node&amp;rsquo;s peak power
(fewer prefill spikes) and improves average utilisation, which translates into ~10–15% less
J/token on mixed loads with long prompts (&lt;a href="https://arxiv.org/pdf/2308.16369">arXiv 2308.16369&lt;/a>).&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"># Enable chunked prefill in vLLM (chunk size: 512 tokens)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vllm serve meta-llama/Llama-3-70B-Instruct &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --enable-chunked-prefill &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --max-num-batched-tokens &lt;span class="m">512&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="lever-8-scheduling-to-clean-hours">Lever 8: scheduling to clean hours&lt;/h2>
&lt;p>This lever does not reduce physical J/token, but it does reduce the &lt;strong>gCO₂/token&lt;/strong> of deferrable load.
The mechanics: moving training, document ingestion, batch re-ranking and fine-tuning
to the hours of lowest grid carbon intensity.&lt;/p>
&lt;p>Impact figures for temporal shifting (&lt;a href="https://arxiv.org/pdf/2507.09942">ACM SLIT, arXiv 2507.09942&lt;/a>):&lt;/p>
&lt;ul>
&lt;li>CO₂ reduction from temporal shifting: &lt;strong>up to 34.7%&lt;/strong> for flexible loads.&lt;/li>
&lt;li>With carbon-aware reinforcement learning (Eco-Orchestrator): up to a &lt;strong>70% offset&lt;/strong> in
integrated deployments.&lt;/li>
&lt;li>In Spain, the hourly variation in intensity is ~80–250 gCO₂/kWh: a factor of ~3× within the
same day (see &lt;a href="https://blog.lo0.es/en/posts/watt-to-carbon-pue-grid-intensity-gco2-per-token/">from watt to carbon&lt;/a>).&lt;/li>
&lt;/ul>
&lt;p>The practical implementation uses Kueue or Volcano on Kubernetes, with a grid intensity
metric (the ElectricityMaps API or esios) as the scheduling signal. Loads are marked with a
&lt;code>carbon-deadline&lt;/code> annotation (the maximum tolerable wait) and the scheduler places them
in the minimum-intensity hours within that window.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="c"># Kueue annotation for carbon-aware scheduling&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="nt">metadata&lt;/span>&lt;span class="p">:&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="nt">annotations&lt;/span>&lt;span class="p">:&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="nt">kueue.x-k8s.io/carbon-aware&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;true&amp;#34;&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="nt">kueue.x-k8s.io/carbon-deadline&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s2">&amp;#34;8h&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="the-power-cap-vs-throughput-curve-the-sweet-spot">The power cap vs throughput curve: the sweet spot&lt;/h2>
&lt;div class="diagram" style="max-width:720px;margin:1rem auto;">
&lt;svg viewBox="0 0 720 320" role="img" aria-label="Power cap vs throughput curve on H100 SXM: the efficiency sweet spot (minimum J/token) sits between 490 and 560 W, where the power reduction outpaces the throughput drop" xmlns="http://www.w3.org/2000/svg">
&lt;style>.ax{fill:none;stroke:currentColor;stroke-width:1}.ln{fill:none;stroke:currentColor;stroke-width:1.8}.ln2{fill:none;stroke:currentColor;stroke-width:1.8;stroke-dasharray:6 3}.tl{font:600 12px sans-serif;fill:currentColor}.ts{font:11px sans-serif;fill:currentColor}.dot{fill:currentColor}&lt;/style>
&lt;defs>&lt;marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="currentColor"/>&lt;/marker>&lt;/defs>
&lt;line class="ax" x1="60" y1="30" x2="60" y2="240" marker-end="url(#arr)"/>
&lt;line class="ax" x1="60" y1="240" x2="660" y2="240" marker-end="url(#arr)"/>
&lt;text x="62" y="22" class="ts">%&lt;/text>
&lt;text x="330" y="268" class="ts">Power cap (W) →&lt;/text>
&lt;text x="10" y="80" class="ts" transform="rotate(-90 10 140)">%&lt;/text>
&lt;text x="62" y="245" class="ts">200&lt;/text>
&lt;text x="152" y="245" class="ts">280&lt;/text>
&lt;text x="242" y="245" class="ts">350&lt;/text>
&lt;text x="332" y="245" class="ts">420&lt;/text>
&lt;text x="412" y="245" class="ts">490&lt;/text>
&lt;text x="492" y="245" class="ts">560&lt;/text>
&lt;text x="572" y="245" class="ts">630&lt;/text>
&lt;text x="642" y="245" class="ts">700&lt;/text>
&lt;text x="64" y="235" class="ts">0&lt;/text>
&lt;text x="54" y="195" class="ts">50&lt;/text>
&lt;text x="54" y="155" class="ts">70&lt;/text>
&lt;text x="54" y="115" class="ts">80&lt;/text>
&lt;text x="54" y="75" class="ts">90&lt;/text>
&lt;text x="44" y="45" class="ts">100&lt;/text>
&lt;line class="ax" x1="58" y1="40" x2="62" y2="40"/>
&lt;line class="ax" x1="58" y1="75" x2="62" y2="75"/>
&lt;line class="ax" x1="58" y1="115" x2="62" y2="115"/>
&lt;line class="ax" x1="58" y1="155" x2="62" y2="155"/>
&lt;line class="ax" x1="58" y1="195" x2="62" y2="195"/>
&lt;path class="ln" d="M90,195 L180,160 L240,130 L330,115 L420,95 L500,75 L590,55 L650,40"/>
&lt;path class="ln2" d="M90,160 L180,140 L240,128 L330,118 L420,108 L500,98 L590,92 L650,90"/>
&lt;text x="580" y="48" class="ts">power (% TDP)&lt;/text>
&lt;text x="560" y="104" class="ts">throughput (%)&lt;/text>
&lt;circle class="dot" cx="420" cy="95" r="5"/>
&lt;circle class="dot" cx="500" cy="75" r="5"/>
&lt;line class="ax" x1="420" y1="95" x2="420" y2="240" stroke-dasharray="3 3"/>
&lt;line class="ax" x1="500" y1="75" x2="500" y2="240" stroke-dasharray="3 3"/>
&lt;text x="380" y="88" class="tl">sweet spot&lt;/text>
&lt;text x="362" y="280" class="ts">490–560 W: −30% power, &amp;lt;10% throughput. Minimum J/token.&lt;/text>
&lt;text x="62" y="305" class="ts">H100 SXM (700 W TDP). Memory-bound load (LLM decode). Source: arXiv 2604.11391, NERSC.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;p>Reading the chart: the power curve (solid line) falls faster than the throughput
curve (dashed line) in the 490–560 W zone. Above 560 W, each additional 70 W
gives only ~5% extra throughput; below 420 W, throughput starts
falling faster than power. The &lt;strong>efficiency sweet spot&lt;/strong> (minimum J/token) sits
at 490–560 W for decode-bound loads.&lt;/p>
&lt;p>For compute-bound loads (pure prefill), the sweet spot shifts to 500–600 W: prefill
saturates SM compute and needs more power to sustain throughput.&lt;/p>
&lt;hr>
&lt;h2 id="how-to-measure-the-effect-and-validate-quality">How to measure the effect and validate quality&lt;/h2>
&lt;h3 id="measurement-stack">Measurement stack&lt;/h3>
&lt;p>The full stack for measuring the effect of each lever:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>What to measure&lt;/th>
&lt;th>Tool&lt;/th>
&lt;th>Metric&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Real-time GPU power&lt;/td>
&lt;td>DCGM (&lt;code>DCGM_FI_DEV_POWER_USAGE&lt;/code>)&lt;/td>
&lt;td>W per GPU, 100ms&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>J/token in production&lt;/td>
&lt;td>Kepler + vLLM tokens&lt;/td>
&lt;td>&lt;code>rate(kepler_joules) / rate(vllm_tokens)&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>J/token on the bench&lt;/td>
&lt;td>Zeus (&lt;code>ZeusMonitor&lt;/code>)&lt;/td>
&lt;td>J measured during the benchmark&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Throughput&lt;/td>
&lt;td>vLLM metrics (&lt;code>vllm:generation_tokens_total&lt;/code>)&lt;/td>
&lt;td>tok/s&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>TPOT latency&lt;/td>
&lt;td>vLLM (&lt;code>vllm:e2e_request_latency&lt;/code>)&lt;/td>
&lt;td>ms/tok&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Output quality&lt;/td>
&lt;td>lm-evaluation-harness&lt;/td>
&lt;td>MMLU, HumanEval, etc.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>See the full stack in &lt;a href="https://blog.lo0.es/en/posts/measuring-energy-in-production-kepler-dcgm-stack/">energy tooling&lt;/a>.&lt;/p>
&lt;h3 id="measurement-protocol-per-lever">Measurement protocol per lever&lt;/h3>
&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"># Real-time J/token (Kepler + vLLM in Prometheus)&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="nl">container&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="p">&amp;#34;&lt;/span>&lt;span class="s">vllm&lt;/span>&lt;span class="p">&amp;#34;}[&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;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>&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">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;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"># Average power per GPU (DCGM)&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">avg&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">gpu&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"># Check that the power cap is active&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">avg&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">gpu&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_LIMIT&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>With Zeus, the configuration sweep is automatic:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="kn">from&lt;/span> &lt;span class="nn">zeus.monitor&lt;/span> &lt;span class="kn">import&lt;/span> &lt;span class="n">ZeusMonitor&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">monitor&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">ZeusMonitor&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">gpu_indices&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="mi">0&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">2&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">3&lt;/span>&lt;span class="p">])&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">with&lt;/span> &lt;span class="n">monitor&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">begin_window&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;fp8_inference&amp;#34;&lt;/span>&lt;span class="p">):&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1"># run the benchmark with vLLM FP8&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">run_benchmark&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">model&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s2">&amp;#34;llama-3-70b-fp8&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">num_tokens&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="mi">10_000&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">result&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">monitor&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">end_window&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s2">&amp;#34;fp8_inference&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="sa">f&lt;/span>&lt;span class="s2">&amp;#34;J/token: &lt;/span>&lt;span class="si">{&lt;/span>&lt;span class="n">result&lt;/span>&lt;span class="o">.&lt;/span>&lt;span class="n">total_energy&lt;/span> &lt;span class="o">/&lt;/span> &lt;span class="mi">10_000&lt;/span>&lt;span class="si">:&lt;/span>&lt;span class="s2">.4f&lt;/span>&lt;span class="si">}&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="quality-validation">Quality validation&lt;/h3>
&lt;p>Validating that the lever does not degrade quality is done with lm-evaluation-harness
(&lt;a href="https://github.com/EleutherAI/lm-evaluation-harness">github.com/EleutherAI/lm-evaluation-harness&lt;/a>):&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"># Compare MMLU between FP16 and FP8&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">lm_eval --model vllm &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --model_args &lt;span class="nv">pretrained&lt;/span>&lt;span class="o">=&lt;/span>meta-llama/Llama-3-70B-Instruct,dtype&lt;span class="o">=&lt;/span>float16 &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --tasks mmlu --num_fewshot &lt;span class="m">5&lt;/span> --output_path ./results/fp16/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">lm_eval --model vllm &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --model_args &lt;span class="nv">pretrained&lt;/span>&lt;span class="o">=&lt;/span>meta-llama/Llama-3-70B-Instruct,quantization&lt;span class="o">=&lt;/span>fp8 &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --tasks mmlu --num_fewshot &lt;span class="m">5&lt;/span> --output_path ./results/fp8/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The MMLU score difference between FP16 and FP8 with calibration is typically
&amp;lt;1%. Without calibration it can be 2–4%.&lt;/p>
&lt;hr>
&lt;h2 id="pareto-decision-table-energy--latency--quality">Pareto decision table (energy / latency / quality)&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Lever&lt;/th>
&lt;th>J/token&lt;/th>
&lt;th>TPOT (latency)&lt;/th>
&lt;th>Quality&lt;/th>
&lt;th>Implementation cost&lt;/th>
&lt;th>Reversibility&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>FP8 quantisation&lt;/td>
&lt;td>↓↓↓&lt;/td>
&lt;td>↓ (improves)&lt;/td>
&lt;td>~ (−&amp;lt;1%)&lt;/td>
&lt;td>Low (1 flag)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>INT4 AWQ quantisation&lt;/td>
&lt;td>↓↓↓↓&lt;/td>
&lt;td>↓ (improves)&lt;/td>
&lt;td>↓ (−1–3%)&lt;/td>
&lt;td>Medium (recalibrate)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Continuous batching&lt;/td>
&lt;td>↓↓↓&lt;/td>
&lt;td>~ (neutral on TPOT)&lt;/td>
&lt;td>~&lt;/td>
&lt;td>Low (new engine)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Power cap 70% TDP&lt;/td>
&lt;td>↓↓&lt;/td>
&lt;td>↑ &amp;lt;10%&lt;/td>
&lt;td>~&lt;/td>
&lt;td>Very low (1 command)&lt;/td>
&lt;td>Immediate&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DVFS decode&lt;/td>
&lt;td>↓↓↓&lt;/td>
&lt;td>↑ &amp;lt;6%&lt;/td>
&lt;td>~&lt;/td>
&lt;td>Medium (script + tuning)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Speculative decoding&lt;/td>
&lt;td>↓ (low batch)&lt;/td>
&lt;td>↓ (improves TTFT)&lt;/td>
&lt;td>~&lt;/td>
&lt;td>Medium (draft model)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Prefix caching&lt;/td>
&lt;td>↓↓ (prefill)&lt;/td>
&lt;td>↓↓ (TTFT improves)&lt;/td>
&lt;td>~&lt;/td>
&lt;td>Low (1 flag)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Chunked prefill&lt;/td>
&lt;td>↓&lt;/td>
&lt;td>↑ stable TPOT&lt;/td>
&lt;td>~&lt;/td>
&lt;td>Low (1 flag)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>SLM (7B vs 70B)&lt;/td>
&lt;td>↓↓↓↓&lt;/td>
&lt;td>↓↓ (improves a lot)&lt;/td>
&lt;td>↓↓ (−variable)&lt;/td>
&lt;td>High (quality re-eval)&lt;/td>
&lt;td>Medium&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>MoE (vs dense, same active size)&lt;/td>
&lt;td>↑ (+54%)&lt;/td>
&lt;td>↑&lt;/td>
&lt;td>~&lt;/td>
&lt;td>—&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Scheduling to clean hours&lt;/td>
&lt;td>~ J/token, ↓↓ CO₂&lt;/td>
&lt;td>~ (for deferrable)&lt;/td>
&lt;td>~&lt;/td>
&lt;td>Medium (scheduler)&lt;/td>
&lt;td>High&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Key: ↓↓↓↓ strong improvement · ↓↓↓ significant improvement · ↓↓ moderate improvement · ↓ slight improvement ·
~ neutral · ↑ worsens · ↑↑ worsens significantly.&lt;/p>
&lt;hr>
&lt;h2 id="stacking-levers-the-combined-effect">Stacking levers: the combined effect&lt;/h2>
&lt;p>The levers are mostly &lt;strong>orthogonal&lt;/strong> and they stack. The maximum combined impact
documented in (&lt;a href="https://arxiv.org/pdf/2504.17674">arXiv 2504.17674&lt;/a>):&lt;/p>
&lt;blockquote>
&lt;p>&amp;ldquo;Correct application of the relevant inference optimisations can reduce
total energy consumption by up to 73% against unoptimised baselines.&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>Recommended sequence by cost-benefit:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Optimised engine&lt;/strong> (vLLM, TRT-LLM) with continuous batching: −25–40% immediately.&lt;/li>
&lt;li>&lt;strong>FP8 quantisation&lt;/strong> (if the hardware supports it: H100, A100 with limited support): a further −30–50%
on the remaining J/token.&lt;/li>
&lt;li>&lt;strong>Power cap at 70% TDP&lt;/strong>: −20–30% power with &amp;lt;10% of throughput. Low cost.&lt;/li>
&lt;li>&lt;strong>Prefix caching&lt;/strong>: turn it on if there are system prompts or repeated contexts. No cost.&lt;/li>
&lt;li>&lt;strong>Chunked prefill&lt;/strong>: if the load has long variable prompts.&lt;/li>
&lt;li>&lt;strong>DVFS in decode&lt;/strong>: a further −22–45% if the SLO allows it.&lt;/li>
&lt;li>&lt;strong>Speculative decoding&lt;/strong>: only if the batch is low (&amp;lt;16) and TTFT latency matters.&lt;/li>
&lt;li>&lt;strong>Model selection&lt;/strong>: move to an SLM if the quality is sufficient (evaluate with
lm-evaluation-harness on your specific task).&lt;/li>
&lt;/ol>
&lt;p>Quantified example on 4×H100 SXM (2,800 W node TDP), Llama-3 70B, chat load:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Configuration&lt;/th>
&lt;th>Power (W)&lt;/th>
&lt;th>Throughput (tok/s)&lt;/th>
&lt;th>J/token&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>PyTorch FP16, static batching&lt;/td>
&lt;td>~2,100&lt;/td>
&lt;td>~400&lt;/td>
&lt;td>&lt;strong>5.25&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vLLM FP16, continuous batching&lt;/td>
&lt;td>~2,200&lt;/td>
&lt;td>~1,800&lt;/td>
&lt;td>&lt;strong>1.22&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>vLLM FP8, continuous batching&lt;/td>
&lt;td>~2,100&lt;/td>
&lt;td>~2,400&lt;/td>
&lt;td>&lt;strong>0.875&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>+ power cap 490 W/GPU (1,960 W node)&lt;/td>
&lt;td>~1,960&lt;/td>
&lt;td>~2,160&lt;/td>
&lt;td>&lt;strong>0.907&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>+ prefix caching (40% hit rate)&lt;/td>
&lt;td>~1,960&lt;/td>
&lt;td>~2,600&lt;/td>
&lt;td>&lt;strong>0.754&lt;/strong>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>+ DVFS decode 1,200 MHz&lt;/td>
&lt;td>~1,500&lt;/td>
&lt;td>~2,400&lt;/td>
&lt;td>&lt;strong>0.625&lt;/strong>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>The values are illustrative estimates based on the cited papers applied to
a 4×H100 node. Real J/token depends on the prompt distribution, the effective batch
and the temperature of the models. Measuring it with Zeus or DCGM+Kepler is mandatory.&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;h2 id="reference-hardware-tdp-and-power-cap-ranges">Reference hardware: TDP and power cap ranges&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>GPU&lt;/th>
&lt;th>TDP (W)&lt;/th>
&lt;th>Supported cap range&lt;/th>
&lt;th>Decode sweet spot&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>H100 SXM 80GB&lt;/td>
&lt;td>700&lt;/td>
&lt;td>200–700 W&lt;/td>
&lt;td>~490–560 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>H100 PCIe 80GB&lt;/td>
&lt;td>350&lt;/td>
&lt;td>100–350 W&lt;/td>
&lt;td>~245–280 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>A100 SXM 80GB&lt;/td>
&lt;td>400&lt;/td>
&lt;td>100–400 W&lt;/td>
&lt;td>~280–320 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>A100 PCIe 80GB&lt;/td>
&lt;td>300&lt;/td>
&lt;td>100–300 W&lt;/td>
&lt;td>~210–240 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>L40S 48GB&lt;/td>
&lt;td>350&lt;/td>
&lt;td>100–350 W&lt;/td>
&lt;td>~245–280 W&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RTX 5090 (reference, PCIe)&lt;/td>
&lt;td>575&lt;/td>
&lt;td>~100–575 W&lt;/td>
&lt;td>~400–460 W&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>For the exact ranges: &lt;code>nvidia-smi -q -d POWER | grep -E &amp;quot;Min|Max|Current&amp;quot;&lt;/code>.&lt;/p>
&lt;hr>
&lt;h2 id="executive-summary-by-role">Executive summary by role&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Role&lt;/th>
&lt;th>First action&lt;/th>
&lt;th>Second action&lt;/th>
&lt;th>Key tool&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Cluster operator&lt;/td>
&lt;td>&lt;code>nvidia-smi -pl [70% TDP]&lt;/code> on every node&lt;/td>
&lt;td>Enable persistent mode&lt;/td>
&lt;td>nvidia-smi, DCGM&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Serving engineer&lt;/td>
&lt;td>Migrate to vLLM FP8 with continuous batching&lt;/td>
&lt;td>Enable prefix caching&lt;/td>
&lt;td>vLLM, llm-compressor&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Platform architect&lt;/td>
&lt;td>Select the smallest model that meets the quality SLO&lt;/td>
&lt;td>Design a carbon-based scheduling policy&lt;/td>
&lt;td>lm-evaluation-harness, Kueue&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>MLOps team&lt;/td>
&lt;td>Set up a power cap sweep with Zeus&lt;/td>
&lt;td>Instrument J/token in Prometheus&lt;/td>
&lt;td>Zeus, DCGM exporter&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>See the full measurement stack in &lt;a href="https://blog.lo0.es/en/posts/measuring-energy-in-production-kepler-dcgm-stack/">energy tooling&lt;/a>
and the J/token methodology in &lt;a href="https://blog.lo0.es/en/posts/energy-per-token-spain-methodology-electricity-market-speculation/">energy per token&lt;/a>.
For the context of reference energy leaderboards and benchmarks, see &lt;a href="https://blog.lo0.es/en/posts/llm-energy-leaderboards-wh-per-token/">LLM energy leaderboards&lt;/a>.
The connection with full TCO is in &lt;a href="https://blog.lo0.es/en/posts/gpu-idle-cost-not-on-any-invoice/">GPU utilisation as FinOps&lt;/a>.&lt;/p>
&lt;hr>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>arXiv 2504.17674 · Energy Considerations of LLM Inference and Efficiency Optimizations (CMU/Hugging Face, 2025) — &lt;a href="https://arxiv.org/pdf/2504.17674">https://arxiv.org/pdf/2504.17674&lt;/a>&lt;/li>
&lt;li>arXiv 2604.11391 · Architectural Trade-offs: power-capping NVIDIA H100 and H200 (FAU Erlangen, 2026) — &lt;a href="https://arxiv.org/html/2604.11391v1">https://arxiv.org/html/2604.11391v1&lt;/a>&lt;/li>
&lt;li>arXiv 2512.03024 · TokenPowerBench: Benchmarking the Power Consumption of LLM Inference — &lt;a href="https://arxiv.org/pdf/2512.03024">https://arxiv.org/pdf/2512.03024&lt;/a>&lt;/li>
&lt;li>arXiv 2602.09113 · Benchmarking the Energy Savings with Speculative Decoding Strategies — &lt;a href="https://arxiv.org/pdf/2602.09113">https://arxiv.org/pdf/2602.09113&lt;/a>&lt;/li>
&lt;li>arXiv 2501.08219 · Characterizing LLM Inference Energy-Performance Tradeoffs across Workloads and GPU Scaling — &lt;a href="https://arxiv.org/abs/2501.08219">https://arxiv.org/abs/2501.08219&lt;/a>&lt;/li>
&lt;li>arXiv 2602.18755 · DualScale: Energy-Efficient Disaggregated LLM Serving via Phase-Aware Placement and DVFS — &lt;a href="https://arxiv.org/pdf/2602.18755">https://arxiv.org/pdf/2602.18755&lt;/a>&lt;/li>
&lt;li>arXiv 2508.16449 · GreenLLM: SLO-Aware Dynamic Frequency Scaling for Energy-Efficient LLM Serving — &lt;a href="https://arxiv.org/pdf/2508.16449">https://arxiv.org/pdf/2508.16449&lt;/a>&lt;/li>
&lt;li>HAL 05190051 · DVFS-GPT: Dynamic Voltage and Frequency Scaling for Energy-Efficient LLMs — &lt;a href="https://hal.science/hal-05190051">https://hal.science/hal-05190051&lt;/a>&lt;/li>
&lt;li>arXiv 2308.16369 · SARATHI: Efficient LLM Inference by Piggybacking Decodes with Chunked Prefills — &lt;a href="https://arxiv.org/pdf/2308.16369">https://arxiv.org/pdf/2308.16369&lt;/a>&lt;/li>
&lt;li>arXiv 2507.09942 · Green-LLM: Optimal Workload Allocation for Environmentally-Aware Distributed Inference — &lt;a href="https://arxiv.org/pdf/2507.09942">https://arxiv.org/pdf/2507.09942&lt;/a>&lt;/li>
&lt;li>arXiv 2505.06371 · The ML.ENERGY Benchmark: Toward Automated Inference Energy Measurement and Optimization — &lt;a href="https://arxiv.org/html/2505.06371v1">https://arxiv.org/html/2505.06371v1&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;li>Zeus · PyTorch blog: Deep Learning Energy Measurement and Optimization — &lt;a href="https://pytorch.org/blog/zeus/">https://pytorch.org/blog/zeus/&lt;/a>&lt;/li>
&lt;li>Baseten · 33% faster LLM inference with FP8 quantization — &lt;a href="https://www.baseten.co/blog/33-faster-llm-inference-with-fp8-quantization/">https://www.baseten.co/blog/33-faster-llm-inference-with-fp8-quantization/&lt;/a>&lt;/li>
&lt;li>NVIDIA · Managing Power Capping (DGX H100/H200 User Guide) — &lt;a href="https://docs.nvidia.com/dgx/dgxh100-user-guide/power-capping.html">https://docs.nvidia.com/dgx/dgxh100-user-guide/power-capping.html&lt;/a>&lt;/li>
&lt;li>NERSC · GPU Power Capping documentation — &lt;a href="https://docs.nersc.gov/jobs/power-capping/">https://docs.nersc.gov/jobs/power-capping/&lt;/a>&lt;/li>
&lt;li>MLCommons · MLPerf Inference v5.1 results — &lt;a href="https://mlcommons.org/2025/09/mlperf-inference-v5-1-results/">https://mlcommons.org/2025/09/mlperf-inference-v5-1-results/&lt;/a>&lt;/li>
&lt;li>vLLM · Disaggregated Prefill documentation — &lt;a href="https://docs.vllm.ai/en/latest/features/disagg_prefill/">https://docs.vllm.ai/en/latest/features/disagg_prefill/&lt;/a>&lt;/li>
&lt;li>Microsoft Research · Characterizing Power Management Opportunities for LLMs in the Cloud (ASPLOS 2024) — &lt;a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2024/03/GPU_Power_ASPLOS_24.pdf">https://www.microsoft.com/en-us/research/wp-content/uploads/2024/03/GPU_Power_ASPLOS_24.pdf&lt;/a>&lt;/li>
&lt;li>EcoInfer (MDPI Electronics) · Optimizing Energy Efficiency with Latency Guarantees Through Iteration-Level GPU Frequency Control — &lt;a href="https://doi.org/10.3390/electronics15102139">https://doi.org/10.3390/electronics15102139&lt;/a>&lt;/li>
&lt;/ul></description></item><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>