- Explain where energy goes in AI systems, and why inference can outweigh training over a model's lifetime.
- Calculate the energy of a workload from power and time, and convert it to facility energy, emissions and water using PUE, grid carbon intensity and WUE.
- Interpret data-center growth projections from reputable sources such as the IEA, including their uncertainty.
- Distinguish operational from embodied emissions and location-based from market-based Scope 2 accounting.
- Measure GPU energy in code and prioritize efficiency levers across models, software, hardware and facilities.
Before this: Datacenter AI Hardware: GPUs, Accelerators, Interconnects and Rack-Scale Systems, Inference Serving at Scale: Batching, KV-Cache Management and Speculative Decoding, Scaling Laws and Compute-Optimal Training
AI runs on electricity, and at today's scale that is a public question, not only an engineering one. Utilities plan grid upgrades around new data-center campuses, companies publish sustainability reports, regulators ask for disclosures, and customers ask "what is the footprint of this feature?" A professional AI engineer should be able to produce a defensible estimate, explain its assumptions, and know which design choices actually move the number.
Intuition: building the factory vs running the delivery fleet
Think of training as building a factory: a large, one-time burst of energy concentrated in weeks or months. Think of inference as running the delivery fleet that the factory supplies: each delivery (a query) uses a small amount of energy, but the fleet runs every day for the life of the product. Whether the factory or the fleet dominates depends on how many deliveries you make. For a popular model, the daily fleet bill, summed over a year or more of deployment, can exceed the construction bill.
Two more pieces complete the picture. The building that houses the machines has overhead: cooling, power conversion, lighting (captured by PUE). And the fuel mix of the local grid decides how much carbon each kilowatt-hour carries. The same workload can differ in emissions by a factor of ten or more depending on where and when it runs.
Where the energy goes
Training
Training energy scales with total compute. For a dense transformer, compute is about FLOPs ( parameters, tokens), so doubling either doubles energy at fixed hardware efficiency. Training energy also includes failed runs, hyperparameter searches and ablations, which can be a large multiple of the final run and are rarely reported.
Inference
Inference energy per request depends on model size (active parameters), prompt and output length, batching efficiency and hardware. Reasoning models that generate thousands of hidden "thinking" tokens per answer use proportionally more energy per query. Total inference energy is per-request energy times request volume, and volume grows with adoption.
Beyond the accelerator
The GPU is not the only consumer. Servers include CPUs, memory, NICs and fans; racks include switches; the facility adds cooling and power-conversion losses. Published per-chip thermal design power (TDP) figures are a ceiling for the chip, not the energy of the job.
The core method: power times time
Energy is power integrated over time. For a steady workload:
where is the average power of the IT equipment (servers and network) in kilowatts and is duration in hours, giving kilowatt-hours (kWh). The facility uses more:
Power usage effectiveness (PUE) is total facility energy divided by IT equipment energy. A PUE of 1.0 would mean zero overhead. Modern hyperscale facilities with efficient cooling achieve values close to 1.1; older enterprise server rooms often run far higher. PUE is an annual average and says nothing about how efficient the IT equipment itself is.
Operational emissions follow from the grid's carbon intensity (kg CO2-equivalent per kWh):
Water has two components. On-site water is mostly evaporated in cooling towers, measured by water usage effectiveness (WUE) in liters per kWh of IT energy. Off-site water is consumed at power plants generating the electricity, and depends on the generation mix.
Worked example 1: a training run
A team trains a model on 128 nodes, each with 8 GPUs (1,024 GPUs total), for 30 days. Measured average node power, including CPUs, memory and networking, is 8 kW (below the nameplate maximum because GPUs are not at full TDP every millisecond). Facility PUE is 1.2.
- IT power: kW.
- Duration: h.
- IT energy: kWh MWh.
- Facility energy: kWh MWh.
- Emissions on a grid at 0.40 kg/kWh: kg t CO2e. On a grid at 0.05 kg/kWh (largely hydro, nuclear or wind): t CO2e.
- On-site water at an assumed WUE of 0.3 L/kWh: L m³.
The same computation differs by a factor of eight in emissions purely by location. All inputs here are illustrative; in a real report, state each one and its source.
Worked example 2: an inference service
An 8-GPU server draws 6 kW on average while sustaining 20,000 output tokens/s across all users (high batch).
- Energy per token: J/token.
- A 500-token answer: J Wh of IT energy.
- With PUE 1.2: Wh per answer.
- At 10 million answers per day: Wh kWh/day, about 183 MWh/year.
Now change one assumption: if the same server only achieves 2,000 tokens/s because of low traffic (small batches), energy per token rises tenfold to 3 J. Utilization is the dominant variable for inference energy, which connects directly to the batching techniques in Inference serving at scale. Prompt tokens (prefill) also cost energy, which this simple per-output-token estimate folds into the measured server power.
Comparing the two examples: 885 MWh for training vs about 183 MWh per year for this service. With higher traffic, longer outputs, or several years of deployment, inference overtakes training. Published per-query estimates vary by orders of magnitude for exactly these reasons, so be wary of any single "energy per query" figure quoted without its assumptions.
Measuring instead of guessing
NVIDIA GPUs (Volta and newer) expose a cumulative energy counter through NVML. The pynvml bindings (installed as nvidia-ml-py) let you read it before and after a workload:
import time
import pynvml # pip install nvidia-ml-py
def gpu_energy_joules(fn, *args, **kwargs):
"""Run fn and return (result, joules per GPU, seconds)."""
pynvml.nvmlInit()
handles = [pynvml.nvmlDeviceGetHandleByIndex(i)
for i in range(pynvml.nvmlDeviceGetCount())]
start = [pynvml.nvmlDeviceGetTotalEnergyConsumption(h) for h in handles] # millijoules
t0 = time.time()
result = fn(*args, **kwargs)
seconds = time.time() - t0
end = [pynvml.nvmlDeviceGetTotalEnergyConsumption(h) for h in handles]
pynvml.nvmlShutdown()
return result, [(e - s) / 1000 for s, e in zip(start, end)], seconds
def footprint(joules, pue=1.2, g_kg_per_kwh=0.4, overhead=1.3):
"""Scale GPU energy to server and facility level; return kWh and kg CO2e."""
kwh_facility = sum(joules) / 3.6e6 * overhead * pue
return kwh_facility, kwh_facility * g_kg_per_kwh
Notes on the code: the counter covers the GPU board only, so overhead (here an assumed 1.3) scales to whole-server energy; measure it with rack power meters or the server's management controller if you can. Make sure the GPU work has finished before reading the counter (with PyTorch, call torch.cuda.synchronize() at the end of fn). Open-source tools such as CodeCarbon and Zeus wrap the same idea and add carbon-intensity lookups.
Grid and data-center growth
The International Energy Agency's Energy and AI report (April 2025) is the most cited global baseline. It estimated that data centers used about 415 TWh of electricity in 2024, roughly 1.5% of global electricity consumption, and projected in its base case that this would more than double to about 945 TWh by 2030, comparable to Japan's current annual electricity use. The United States and China account for most of the projected growth (together nearly 80% by the IEA's figures, as reported by Scientific American). AI-focused accelerated servers are the fastest-growing component.
How to read such figures responsibly:
- They are scenarios, not forecasts. The IEA presents ranges that depend on chip efficiency, adoption and power-supply constraints. Use the base case with its range, and cite the edition and date.
- Global share understates local impact. 1.5% of global electricity is modest, but data centers cluster: in some regions they account for a large and rising share of demand, straining transmission, generation adequacy and grid connection queues. Local constraints, not global totals, are what delay projects.
- AI is a subset of data-center demand. Data-center totals include conventional cloud, streaming, storage and enterprise IT. Be careful not to attribute the entire figure to AI.
- Efficiency and demand interact. Each hardware generation delivers more tokens per joule, but cheaper tokens encourage more use (a rebound effect related to the Jevons paradox). Total consumption depends on both.
Water
Cooling large heat loads often uses evaporative systems, which consume water. The effect is highly local: a facility in a water-stressed region matters more than one using reclaimed water in a wet climate. Researchers (Li et al., 2023, "Making AI Less Thirsty") have argued that AI's water footprint should be reported alongside carbon, including the off-site water used to generate electricity. Design trade-offs cut both ways: closed-loop liquid cooling and dry coolers can reduce water use but may increase electricity use in hot weather. Report water by location and season, not just as an annual total.
Carbon accounting
Scopes
The GHG Protocol classifies emissions into:
- Scope 1: direct emissions from owned sources (for example, diesel backup generators).
- Scope 2: emissions from purchased electricity, heat or cooling. This is where most operational data-center emissions sit.
- Scope 3: all other value-chain emissions, including embodied emissions from manufacturing chips, servers and buildings, and, for a cloud customer, the provider's emissions attributable to their usage.
Location-based vs market-based Scope 2
- Location-based uses the average carbon intensity of the grid where the electricity is consumed.
- Market-based reflects contractual instruments: power purchase agreements (PPAs) and renewable energy certificates. A company can report near-zero market-based emissions while the local grid still burns fossil fuels.
Both are legitimate and both should be disclosed. A stricter approach, 24/7 carbon-free energy matching, compares clean supply and consumption hour by hour rather than over a year, which better reflects the physical grid.
Embodied carbon
Manufacturing accelerators, HBM, servers and buildings has a footprint amortized over hardware lifetime. On a very clean grid, embodied emissions can be a large share of the total, which makes extending hardware life and using it at high utilization doubly important.
Worked example 3: per-run accounting summary
For worked example 1 on a grid at 0.40 kg/kWh, a defensible disclosure might read: "Facility energy 885 MWh (IT 737 MWh, PUE 1.2). Location-based operational emissions 354 t CO2e. Market-based emissions [value] under [named PPA]. Embodied emissions not included." Stating what is excluded is as important as the number.
Efficiency levers
Ordered roughly by typical impact for a team building on existing models:
- Right-size the model. A distilled or smaller model, or a mixture-of-experts model with fewer active parameters, can cut energy per token several-fold if it meets the quality bar. Route easy requests to small models.
- Serve efficiently. High batch utilization, prefix caching, speculative decoding and quantization (FP8, INT4) all reduce joules per token.
- Avoid unnecessary tokens. Shorter prompts, caching repeated answers, limiting reasoning budgets where accuracy does not need them.
- Choose efficient hardware. Newer accelerators usually deliver more work per joule; older hardware kept in service still carries its embodied carbon already spent.
- Choose where and when. Run flexible jobs (training, batch inference, evaluation) in regions and hours with low carbon intensity (carbon-aware scheduling).
- Facility efficiency. Low PUE, liquid cooling, heat reuse and water-aware cooling design.
- Training discipline. Use scaling laws and small-scale experiments to avoid wasted large runs; checkpoint so failures do not repeat work.
Common pitfalls
- Using TDP times hours as measured energy. TDP is a ceiling; measure or use realistic average power, and include the rest of the server.
- Ignoring PUE, or double-counting it when a cloud provider's figures already include facility overhead.
- Quoting a single energy-per-query number without model size, token counts, batching and hardware.
- Counting only the final training run and omitting experiments, failed runs and inference.
- Reporting only market-based emissions, or mixing location- and market-based figures in one comparison.
- Treating global averages as local reality for grid and water impacts.
- Overstating precision. Report ranges and assumptions; these estimates are often uncertain by a factor of two or more.
In practice
- Instrument: log GPU energy (NVML), node power (management controller or PDU) and tokens served, and compute joules per token per endpoint as a standard dashboard metric.
- Write a short footprint note for major training runs: energy, PUE, grid region, location- and market-based emissions, water if known, and exclusions.
- Use cloud providers' carbon reporting tools as a starting point, but understand their methodology and boundaries.
- Fold energy into model selection: when two models meet the quality bar, prefer the one with lower joules per task.
- Keep claims balanced: AI's energy use is significant and growing, concentrated in specific places, and also highly sensitive to engineering choices you control.
Key takeaways
- Energy equals average power times time; multiply IT energy by PUE for facility energy and by grid carbon intensity for operational emissions.
- Inference energy is per-request energy times volume and is dominated by utilization; over a model's lifetime it can exceed training energy.
- The IEA estimated data centers used about 415 TWh (about 1.5% of global electricity) in 2024 and projected about 945 TWh by 2030 in its base case, with impacts concentrated locally.
- Carbon accounting needs both location- and market-based Scope 2 figures, plus a statement on embodied (Scope 3) emissions and exclusions.
- The biggest levers are model right-sizing, efficient serving, avoiding unnecessary tokens, efficient hardware, and running flexible work on cleaner grids.
Terms in this lesson
- PUE
- Power usage effectiveness: total facility energy divided by IT equipment energy, with 1.0 as the ideal.
- WUE
- Water usage effectiveness: liters of site water consumed per kilowatt-hour of IT energy.
- Carbon intensity
- Greenhouse-gas emissions per unit of electricity, usually kg CO2e per kWh, which varies by grid and hour.
- Scope 2 emissions
- Indirect emissions from purchased electricity, heat, steam or cooling under the GHG Protocol.
- Location-based accounting
- Scope 2 method using the average emission factor of the grid where electricity is consumed.
- Market-based accounting
- Scope 2 method reflecting contractual purchases such as PPAs and renewable energy certificates.
- Embodied carbon
- Emissions from manufacturing, transporting and disposing of hardware and buildings, as opposed to operating them.
- Carbon-aware scheduling
- Shifting flexible compute to times or regions with lower grid carbon intensity.
Check your understanding
- 1.
A job runs 64 servers at an average 5 kW each for 48 hours in a facility with PUE 1.25. What is the facility energy?
- 2.
What does a PUE of 1.5 mean?
- 3.
An inference server draws 4 kW and produces 8,000 tokens/s. What is the IT energy for a 250-token answer?
- 4.
A company reports near-zero Scope 2 emissions for its AI cluster while the local grid is coal-heavy. Which explanation is most likely?
- 5.
Which change would typically reduce inference energy per token the most for a lightly loaded service?
Exercises
Work each problem before opening the solution.
- Exercise 1Core
Estimate the facility energy and location-based emissions of fine-tuning a model on 4 nodes (8 GPUs each) for 36 hours. Average node power is 7.5 kW, PUE is 1.15 and grid intensity is 0.35 kg CO2e/kWh. Then recompute for a region at 0.02 kg/kWh.
Show solution
IT energy kWh.
Facility kWh.
Emissions at 0.35: kg, about 0.43 t CO2e.
At 0.02: kg, about 0.025 t CO2e, a 17.5-fold reduction from location alone.
- Exercise 2Core
A model's training used 1,200 MWh of facility energy. Its inference service uses 0.03 Wh (facility) per request. How many requests until cumulative inference energy equals training energy? If it serves 50 million requests per day, how many days is that?
Show solution
MWh Wh. Requests (40 billion).
Days days, about 2.2 years. At 500 million requests/day it would be 80 days. Lifetime inference often dominates for widely used models.
- Exercise 3Core
Write a Python function
footprint_report(nodes, kw_per_node, hours, pue, g, wue)that returns IT kWh, facility kWh, kg CO2e and on-site liters, and run it on worked example 1 from the lesson (128 nodes, 8 kW, 720 h, PUE 1.2, g = 0.4, WUE = 0.3).Show solution
def footprint_report(nodes, kw_per_node, hours, pue, g, wue): it_kwh = nodes * kw_per_node * hours facility_kwh = it_kwh * pue return { "it_kwh": it_kwh, "facility_kwh": facility_kwh, "kg_co2e": facility_kwh * g, "onsite_liters": it_kwh * wue, } print(footprint_report(128, 8, 720, 1.2, 0.4, 0.3))Output (rounded): IT 737,280 kWh; facility 884,736 kWh; 353,894 kg CO2e; 221,184 L. These match the lesson. WUE is applied to IT energy by definition.
- Exercise 4Challenge
Your team runs a chatbot on 10 replicas of an 8-GPU server (6 kW each on average, mostly lightly loaded) 24/7. Traffic averages 10 million answers/day of 400 output tokens. Measured capacity per replica at full batch is 20,000 tokens/s, at which a replica draws 6.5 kW.
(a) Compute IT energy per answer today. (b) Size a consolidated fleet (enough full-batch replicas for average load, plus one for headroom; switch the rest off) and compute the new energy per answer, conservatively assuming every remaining replica draws 6.5 kW. (c) Name two risks and how to manage them.
Show solution
(a) Daily IT energy kWh Wh. Energy per answer Wh.
(b) Average demand tokens/s. Replicas at full batch: (77% utilized), plus one for headroom: 4 replicas. Daily energy kWh. Energy per answer Wh, a 57% reduction. The saving comes from switching idle replicas off; leaving them powered on would save almost nothing.
(c) Risks: (1) latency SLO violations at high batch and during traffic peaks, which exceed the daily average; manage with autoscaling on queue depth and TTFT, pre-staged weights for fast cold starts, and a peak-hour schedule. (2) Reduced redundancy: one failure removes a quarter of capacity; keep the headroom replica in a different failure domain and alert on capacity loss.
Further reading
- articleInternational Energy Agency, Energy and AI (2025)
- paperPatterson et al., Carbon Emissions and Large Neural Network Training (2021)
- paperStrubell, Ganesh & McCallum, Energy and Policy Considerations for Deep Learning in NLP (2019)
- paperLuccioni, Viguier & Ligozat, Estimating the Carbon Footprint of BLOOM, a 176B Parameter Language Model (2022)
- paperLi, Yang, Islam & Ren, Making AI Less 'Thirsty': Uncovering and Addressing the Secret Water Footprint of AI Models (2023)
- paperLacoste et al., Quantifying the Carbon Emissions of Machine Learning (2019)
Go further
Sources
Fact-checked and last reviewed 2026-11-05