Home › Green AI engineering
Green AI engineering
For the people who build AI systems: design patterns, an energy-aware orchestration engine, energy tests in CI, CPU and GPU benchmarking, energy observability and the payback of AI-assisted optimisation. Each chapter has working example code and a source for every figure.
A catalogue of green AI design patterns
Eighteen named design patterns that cut the tokens, calls and energy of AI features, each with trade-offs, how to measure it and a code sketch.
How to add energy-efficiency testing to CI/CD
How to test energy in CI: tokens per task, CPU time, RAPL and NVML counters, noise, budgets and regression gates, with a worked GitHub Actions example.
How to benchmark CPU versus GPU inference for energy
Compare CPU and GPU inference energy fairly: fixed prompts, a quality check, steady load levels, RAPL, NVML and wall meters, and a break-even point.
How to build AI energy observability
Record tokens, latency, energy and grid carbon for every AI request and agent step with OpenTelemetry, Prometheus and Kepler, and set energy budgets.
How to build an energy-aware AI orchestration engine
Architecture and a Python reference sketch for an AI orchestration engine that routes, caches, budgets and accounts for tokens and estimated energy.
How to calculate the energy payback of AI-optimised code
Does the energy spent using AI to write or optimise code come back as run-time savings? The formula, published inputs, a worked example and a calculator.