EcoCompute Should-I-Quantize Estimator

v1.0.0
io.github.hongping-zh/ecocompute-estimator Checked 10 hours ago Published 1 month ago

Energy impact of LLM quantization, calibrated to measured GPU data.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

estimate_quantization_energy

Estimate the task-level energy change (ΔE% vs FP16) of weight-only quantization (NF4 or INT8) for a model of a given size on a GPU architecture class, from measured-anchored curves. The answer carries basis (measured/interpolated/estimated), confidence and evidence boundaries.

ParameterTypeDescription
archstringGPU architecture class
batchintegerbatch size (default 1; >1 shrinks savings — modelled, not measured)
ctxintegercontext length (default 2048)
params_bnumbermodel size in billions of parameters, e.g. 7
precisionstringquantization format (default NF4)
qstringalternative: plain-English query, e.g. '13B on A100 int8 batch 32'

get_quantization_crossover

Get the model-size crossover for NF4/INT8 per architecture: below it quantization costs energy, above it saves. Crossovers belong to a card + software stack, not an architecture — the answer says so.

ParameterTypeDescription
archstringoptional: limit to one architecture

list_data_coverage

List what is actually measured (GPU architecture × precision × size range, NVML direct), what is borrowed/estimated, and where the gaps are. Use this before trusting an estimate at the edges of coverage, and to answer 'is there data for my GPU?' honestly.

search_measurements

Search the measured anchors by model name, GPU name, architecture or size. Returns ΔE% vs FP16 per anchor with run counts — the raw evidence behind the curves.

ParameterTypeDescription
query *stringmodel ('TinyLlama'), GPU ('4090'), architecture ('ampere') or size ('7')