What we measure
Every compression call produces anoriginal_tokens and kept_tokens value. The sustainability module converts the difference into an energy and emissions estimate using a simple linear model:
Only the KV context portion of prefill is attributed to savings (controlled by
kv_share_of_prefill). This avoids over-claiming: embedding lookup, attention over new tokens, and other prefill work are excluded.
Default assumptions
The defaults are defined insupercompress/benchmarks/metrics.py as a frozen dataclass so every estimate is fully reproducible and traceable:
You can override any of these by constructing a custom
SustainabilityAssumptions object and passing it to sustainability_from_tokens_saved().
Python API
Usesustainability_from_tokens_saved() to compute an estimate for any number of tokens saved:
Scale example
At 1 million compressions with approximately 800 tokens saved per run:- 800 million tokens avoided from GPU prefill
- ~29 kWh of GPU energy saved (default assumptions)
- ~12 kg CO₂ avoided (US grid average)
Use the Projection calculator on the SuperCompress website (
#impact) to adjust compression volume, tokens-per-run, and grid intensity interactively without writing any code.Honesty guidance for submissions and reports
When citing SuperCompress sustainability metrics in papers, demos, or hackathon submissions, follow these principles to avoid misleading claims:- State assumptions clearly — quote the
SustainabilityAssumptionsvalues used; do not present estimates as live metering. - Report quality alongside savings — token reduction without answer quality data is not a fair comparison. Use
answer_quality_score()or an equivalent evaluation. - Scope the claim correctly — SuperCompress targets edge-CPU policy inference and measurable KV cache reduction, not datacenter-wide carbon accounting.