Green AI research Research-backed Python

green-ai-research-kitDesign, run and report green AI experiments that survive peer review

green-ai-research-kit plans randomised repeated experiments, runs them crash-safe and resumable (Colab and Google Drive friendly), and reports robust statistics, Pareto fronts, LaTeX tables, a methods paragraph and an energy-reporting checklist.

PyPI pip install green-ai-research-kit

Free · MIT license · runs on your machine · no signup PyPI ↗GitHub ↗

How green-ai-research-kit works

Energy numbers in AI papers are easy to get wrong and hard to check. When Henderson and colleagues sampled 100 NeurIPS 2019 papers, none reported carbon and only one reported energy at all. The usual problems are not the research idea. They are a single run per configuration, configurations measured one after another while the machine heats up, means and t-tests on skewed data, and a methods section that leaves out the CPU, the measurement method and whether idle power was subtracted.

green-ai-research-kit takes care of those parts. It builds a repeated plan with a fresh random order in each round, runs it while saving every result immediately (so a Colab disconnect costs one run, not the afternoon), and analyses the results with methods suited to energy and latency data. It then writes the table in LaTeX, a methods paragraph filled in with your machine and settings, and a checklist of what reviewers will ask for. It even tells you when your design is too small to show any significant difference, before you write “no effect”.

Try it

pip install "green-ai-research-kit[bench,scipy]"
green-ai-research-kit bench --models xgb=xgb.json,lgbm=lgbm.txt --data test.csv --drop target --batches 1,1024 --repeats 5 --out results/results.jsonl
green-ai-research-kit analyze results/results.jsonl --by model,batch --metric joules_per_1k --baseline model=xgb,batch=1 --latex results/table.tex

A ready Colab notebook runs a complete experiment on public data and saves everything to Google Drive.

Free and open source under the MIT license. Working on a green AI paper and want the experiments designed properly? Book a call.

Agent skill included

Let your AI coding agent run green-ai-research-kit for you

The green-ai-experiment skill works with Claude Code, Codex, Cursor, Gemini CLI and other agents that read SKILL.md files. It runs the tool, explains each finding in plain words and helps you fix it.

npx skills add MuhammadAhmadZia/green-ai-research-kit --skill green-ai-experiment

Using the Claude or ChatGPT apps instead? Download the skill ZIP from the GitHub releases page and upload it under Skills.

See all 30 agent skills →

Questions about green-ai-research-kit

Why not just run each configuration five times in a row?

Because the machine changes while you measure. CPUs heat up, turbo budgets run out and cloud neighbours come and go, so whatever runs last looks worse. The kit shuffles the order in every round so this drift is spread over all configurations.

Does it work on Google Colab?

Yes, and it was built for it. Every result is saved to Google Drive the moment it exists, and running the notebook again after a disconnect skips the finished runs. Colab has no energy counters, so energy there is an estimate, and the methods paragraph says so.

Which statistics does it use?

Medians with bootstrap 95% intervals, the ratio of medians against a baseline with its own interval, two-sided Mann-Whitney U tests with Holm correction for many comparisons, a drift check against run order, and a Pareto front for two metrics. It also warns when you have too few repeats for any difference to be significant.

Can I use it for LLM or GPU experiments?

Yes. The command line benchmarks saved tree models through greeninfer, and from Python the runner takes any function that returns numbers, so you can measure LLM generation, GPU inference or a whole pipeline with the meter you prefer.

UN Sustainable Development Goals

How each tool maps to SDG targets →

Want this set up and tuned for your store?

The tools are free. If you would rather have the checks run, the findings fixed and the results measured for you, that is what I do for clients.