A tool that uses AI to cut software energy has to answer for its own. GreenCode runs on small, tuned, retrieval-fed models, routes each request to the cheapest component that can answer it, and schedules the heavy work for when the power is clean.
Generative AI is the fastest-growing energy demand in computing. A project that proposes to spend inference in order to save electricity therefore has a plain obligation: the cure has to cost decisively less than the disease, and the arithmetic has to be published. GreenCode's carbon accounting, built on the providers' own published energy figures, puts the inference for a run at well under a thousandth of the first year's saving even on a very generous token allowance, and that ratio only holds because the generative parts of the pipeline are engineered to be frugal.
This is a cross-cutting feature rather than a single stage. Generative models do the refactoring in the quality stage, write the missing documentation, tests and commit messages, generate infrastructure templates and load-test plans, and rewrite the hotspots the energy benchmark identifies. Every one of those components is pluggable, so a cheaper or better model can replace an incumbent as the field moves, without rebuilding the pipeline around it.
The largest general-purpose model is almost never the right instrument for a narrow code task. The project's review of the state of the art points the same way: task-specific, fine-tuned models in the 3B to 13B parameter class match far larger ones on constrained coding work, at a fraction of the energy per token, and they are small enough to run on a customer's own hardware where the code cannot leave the building.
View full sizeWhat reaches the model matters as much as its size. Four choices do most of the work.
Beyond the model itself, the pipeline applies compression techniques such as quantisation and distillation, and hardware-aware optimisation so that a deployment is tuned to the accelerator, server or constrained device it will actually run on. The same build therefore behaves sensibly in a cloud region, in a private data centre and on limited on-premise hardware.
Timing is the last lever. Because the pipeline analyses a codebase asynchronously rather than answering a developer keystroke by keystroke, intensive jobs can wait for low-carbon power and run when the grid is clean. Nothing is blocked on the result in the next second, so that flexibility is close to free.
Claims about efficient AI are easy to make and rarely tested, because the usual code-generation benchmarks score correctness and ignore what the generated code costs to run. Partner work on EnergyBench addresses exactly that, scoring generated code for correctness and for energy together, so a model that writes working but wasteful code is not recorded as a success.
Inside the pipeline, the energy of each run is modelled and reported alongside the saving it produced, using the accounting published in the climate case. A pre-assessment compares the two before a run is committed, and where the return does not justify the inference, the honest answer is not to run it.
Every change the AI makes arrives on a branch as a pull request, with the reasoning behind it, and the team accepts or rejects it. Nothing is merged unseen and nothing runs as a black box. The pipeline builds on existing open models rather than training its own from scratch, treating their training as a cost already spent and adapting them by pruning and fine-tuning for code. Who owns AI-written code is still an open legal question; because people review and approve every change and most of the original code remains, the usual position of a codebase is preserved, as the FAQ explains.
Small tuned models, retrieval instead of brute-force context, routing to the cheapest capable component and scheduling against the energy mix are the methods that make AI viable inside a fixed energy budget, at the edge, on battery power and on constrained hardware. They are the substance of green AI and energy-aware computing, and the techniques are one of the deliverables GreenCode will bring out of the project.
To discuss the methods or trial them on your own workload, get in touch through the contact page.