EcoCompute is an open reproducibility project measuring how LLM quantization affects inference energy per token across GPUs and model sizes. This page is about the part you can run yourself: the container that produced those measurements.
energy.json
Apache-2.0
Not a certified benchmark
energy.json either lands on the
curve published here or visibly does not. Both outcomes are useful; the second one is more useful.
中文读者:逐步的容器使用手册见 EcoCompute 容器数据测量 · 中文使用手册。
Prerequisite for a real measurement: an NVIDIA GPU with NVML power telemetry. Docker is optional — see the two modes below. Without a GPU you can still verify the whole pipeline — see step 3.
curl -fsSL https://raw.githubusercontent.com/hongping-zh/ecocompute-mlcube/main/quickstart.sh | bash
It measures NF4 against its own FP16 baseline on TinyLlama-1.1B, writes a schema-validated
energy.json into ./ecocompute-out/, and prints the overlay link. The script prints every
command it runs.
Time: the measurement is a few minutes; the first run is dominated by downloads and everything is cached
afterwards. The one end-to-end run we have timed took 57 minutes on a China-hosted rented RTX 4090 in
native mode — 5.5 of those were the ~2 GB model, nearly all the rest was ~3 GB of torch/CUDA wheels from
download.pytorch.org. The setup script now prefers the host's configured (domestic) package index for
torch, which should remove most of that, but we have not re-timed it, and we have not timed the docker path at all.
It picks one of two modes and tells you which:
--gpus all; nothing is installed on the host.entrypoint.py, same report.Or drive the image directly:
docker run --rm --gpus all \
-v "$PWD/out:/workspace/outputs" \
ghcr.io/hongping-zh/ecocompute-mlcube:latest energy_estimate \
--model TinyLlama/TinyLlama-1.1B-Chat-v1.0 --params_b 1.1 \
--precision NF4 --gpu_arch auto --output_dir /workspace/outputs --share
git clone https://github.com/hongping-zh/ecocompute-mlcube.git
cd ecocompute-mlcube
# with the official MLCommons MLCube CLI (task name: energy_estimate)
pip install mlcube mlcube-docker
mlcube run --mlcube=. --task=energy_estimate --platform=docker
# ...or drive the entrypoint directly (development / CI)
python3 entrypoint.py energy_estimate \
--parameters_file workspace/parameters/energy_params.yaml \
--output_dir workspace/outputs
cat workspace/outputs/energy.json
python3 entrypoint.py energy_estimate \
--model TinyLlama/TinyLlama-1.1B-Chat-v1.0 \
--precision NF4 --gpu_arch auto --params_b 1.1 \
--output_dir workspace/outputs --prefetch --share
--prefetch — asks the site estimator for its prediction before measuring and prints it,
so you see prediction vs. measurement side by side. Offline or slow? It is skipped silently; the measurement is
never blocked or altered.--share — prints (and writes share_url.txt) a link of the form
quantenergy.tech/?tab=run&overlay=…. Your point is encoded in the URL itself: opening it
restores your marker on the crossover curve entirely in the browser. Nothing is uploaded and no server stores
anything.One JSON report per configuration, validated against
schema/energy.schema.json.
The two fields this site plots are results.vs_fp16_energy_pct and results.basis:
| Field | Meaning |
|---|---|
system_under_test.gpu / .gpu_arch | Card and architecture class (turing, ampere, ada, blackwell) — selects which fitted curve your point is compared against |
workload.* | model_name, params_b, precision (FP16 / NF4 / INT8, weight-only), batch_size, context_length |
measurement.* | method (NVML on-device power sampling), sample_rate_hz, tokens_per_run, iterations |
measurement_source | Where the numbers actually came from — a direct NVML run, or a named dataset fallback |
results.total_energy_joules, energy_per_token_mj, avg_power_watts, throughput_tokens_per_s | Integrated over the generation window, per configuration |
results.vs_fp16_energy_pct | Signed ΔE% against the same model's own FP16 run on the same GPU. Negative = quantization saves energy — this is the value plotted on the crossover curve |
results.basis | measured / interpolated / extrapolated — the tag shown next to every number on this site |
certified_benchmark_result, scenario_note | The report states its own scope: false, and the SingleStream/Offline label is nominal, not LoadGen-enforced |
With --dry_run, or when no NVIDIA GPU / NVML is present, the container emits values derived from
the published EcoCompute dataset, flagged in measurement_source and never labelled
measured.
Some consumer, vGPU and Turing cards return NVML_ERROR_NOT_SUPPORTED. The on-device path is
probed first; on failure the run falls back to the dataset path with the reason recorded — it does not crash and
it does not claim a measurement.
A single failed power read never aborts a run; the count lands in results.dropped_samples so you
can judge the trace quality yourself.
A CPU-only descriptor (mlcube.cpu.yaml + Dockerfile.cpu) builds the image, mounts
the workspace and produces a schema-valid report, so the MLCube contract can be verified on any laptop:
mlcube run --mlcube=mlcube.cpu.yaml --task=energy_estimate --platform=docker.
Determinism matters here for a specific reason: bitsandbytes NF4/INT8 kernels and torch
change their numeric behaviour between releases. Top-level dependencies are pinned with exact ==
versions and the image installs from a full transitive lock captured from the verified CUDA image.
The container was exercised with MLCommons' mlcube CLI (v0.0.9, docker platform):
mlcube describe accepts the descriptor: task energy_estimate, inputs=[parameters_file], outputs=[output_dir].mlcube run on the CPU descriptor builds the image, mounts the workspace and writes workspace/outputs/energy.json.bert-base-uncased, batch_size=32 → Offline scenario).measured.The newest column here — RTX 4090 (Ada), July 2026, five models from 0.5B to 7B × FP16 / NF4 / INT8, all
fifteen configurations real hardware measurements — was produced by this container, driven by the sweep scripts in
autodl/
(setup → environment verification → full model × precision sweep → aggregation). That run extended Ada coverage to
INT8 and to 7B for the first time, and it is archived as its own citable artifact:
10.5281/zenodo.22037483 (CC BY 4.0).
It is a supplementary deep dive alongside the main
v1.1.0 dataset, not a replacement:
n = 1 per configuration.
| Do | Don't |
|---|---|
| Compare precisions on the same GPU | Compare across GPUs without normalising thermal state and clocks |
Treat basis: "measured" as ground truth for that configuration | Cite interpolated / extrapolated values for compliance or procurement claims |
| Read the numbers as GPU-package energy | Present them as whole-system, datacenter or carbon figures without a PUE and grid model |
Report iterations and the observed spread downstream | Publish an n = 1 number as if it were a tight distribution |
scenario field is a nominal label derived from batch size; the container
runs its own warmup/iterations loop and applies no MLPerf LoadGen timing constraints.certified_benchmark_result: false.So the roadmap is not mistaken for the product — these are wanted, but they do not exist today:
linux/amd64, single-GPU
(accelerator_count: 1); it does not measure multi-card or tensor-parallel serving.We are looking for collaborators to reproduce EcoCompute measurements across additional GPUs, cloud instances, model families and quantization backends. If you operate NVIDIA, AMD or other accelerator infrastructure and want to contribute comparable energy-per-token data, please get in touch.
Most valuable, in order:
energy.json
attached is the single most useful thing you can send.How: use the submission form — it parses your energy.json in your
browser, previews your point against the fitted curve, then copies the submission to your clipboard and opens an issue you paste into and send yourself. You can also open
an issue or pull request directly on
the container repository
with your energy.json (and the --share link if you have one), or reach the maintainer via
hongping-zh.github.io.
Accepted submissions appear in the public replications gallery, moderated for schema and
format only — never for results.
@software{ecocompute_mlcube,
title = {EcoCompute energy MLCube: reproducible LLM inference energy measurement},
author = {Zhang, Hongping},
year = {2026},
url = {https://github.com/hongping-zh/ecocompute-mlcube},
license = {Apache-2.0}
}