Repository navigation
Token Reduction as an Energy Efficiency Action
Cutting the tokens an LLM has to read is a carbon-reduction action that the Software Carbon Intensity standard (ISO/IEC 21031:2024, extended by SCI for AI) is designed to credit.
Every token a coding assistant reads has to be processed on accelerator hardware, and that processing draws power. jCodeMunch serves AST-level, query-relevant context in place of full-file reads and broad searches, so the model processes far fewer input tokens to finish the same task. Fewer tokens processed is fewer GPU-seconds spent, which is exactly the kind of elimination the SCI standard counts as a real reduction, not an offset.
This page is the short version: the methodology, the bounds, and the live numbers. The long version, with full telemetry, benchmarks, and an open invitation to the GSF SCI for AI working group, is the 225-Billion-Token Case Study.
When your AI coding tool answers a question, somewhere a data center burns electricity to do it. The more it has to read to answer, the more it burns. jCodeMunch hands the model a tight, relevant slice of your codebase instead of dumping whole files at it, so the same answer costs less power. Across all the installations that opt in to reporting, that adds up to a public, running counter of tokens that were never sent, and therefore never had to be processed.
SCI is defined as SCI = ((E x I) + M) per R, where E is energy (kWh), I is grid carbon intensity (gCO2eq/kWh), M is amortized embodied hardware emissions, and R is a functional unit. At the Consumer boundary (you, the deployer of an upstream model), the relevant lever is E at inference time.
The key property is that the ratio of saved tokens to baseline tokens is invariant under whatever per-token energy figure you trust:
| Term | Baseline run | With-tool run | Effect on SCI |
|---|---|---|---|
| Input tokens per task | T |
T' (smaller) |
drives the reduction |
| Per-token energy |
e (unknown, bounded) |
e (same) |
cancels in the ratio |
Grid intensity I
|
same region | same region | constant |
Embodied M
|
same hardware | same hardware | constant |
| Reduction | (T - T') / T |
Cut input tokens by N% and you cut the inference-side E term by roughly N%. With I and M held constant across both runs, the SCI score drops by approximately N%. The only observable you need is usage.input_tokens, returned on every LLM API call, so any user can reproduce the ratio on their own workload.
Hold per-token energy e as an unknown but bounded constant, measure token counts directly from API logs, and report the percentage reduction. The carbon-equivalent conversion is downstream of choosing a point estimate for e; the proportional reduction is not.
Per-input-token energy in published work spans roughly an order of magnitude. The conversions below use a conservative-to-moderate range derived from peer-reviewed sources (Oviedo et al., Energy Use of AI Inference, Microsoft Research, Joule, April 2026: median 0.31 Wh/query, IQR 0.16-0.60), at the U.S. national-average grid intensity of ~400 gCO2/kWh (an upper bound for most U.S. inference regions):
| Estimate | Energy per token | CO2eq per token |
|---|---|---|
| Conservative | 0.1 mWh | 0.00004 gCO2 |
| Upper | 0.3 mWh | 0.00012 gCO2 |
Applied to the cumulative public counter, the upper bound maps every ~8.3 billion tokens saved to roughly 1 tonne of CO2eq kept out of the atmosphere.
Opt-in production telemetry (default JCODEMUNCH_SHARE_SAVINGS=1, single env var to disable) reports per-session input-token deltas to a public counter anyone can query:
GET https://j.gravelle.us/APIs/savings/total.php
-> {"total_tokens": ..., "db_count": ..., "updated_utc": ...}
Excluded from the figure: pre-telemetry sessions, opted-out sessions, and non-default configurations. The reported total is therefore a conservative lower bound, not an extrapolation.
- Elimination, not neutralization. The tool causes fewer tokens to be processed. No offsets, PPAs, or RECs, all of which SCI explicitly excludes from score reduction.
-
Auditable end to end. The cumulative figure is on a live public endpoint; per-task reductions are reproducible from any major provider's
usage.input_tokens. - Proportional first, absolute second. The percentage-reduction methodology survives any disagreement over per-token energy; only the absolute CO2 conversion depends on the point estimate.
jCodeMunch's whole retrieval model, returning complete AST nodes instead of fixed-size text chunks, is what makes the token reduction structural rather than incidental. The jMRI retrieval spec is the open formalization of that model: rank, winnow, and serve only the symbols a task needs. Energy efficiency at the Consumer boundary is a direct, measurable consequence of retrieval that is precise instead of greedy.
jcodemunch-mcp on GitHub - 1,500+ stars
Start here
Cut your token costs
Green Software / SCI
Features
- Cross-Repository Dependency Tracking
- Expanded Context Providers
- Get Context Bundle
- Incremental Blob-SHA Indexing
- Search Debug Mode
- Suite-Wide Tool Profile Config
- Template-Language Indexing
- Tokenizer True Benchmark Harness
Releases