Towards Green AI: Evaluating Energy Efficiency for Quantized LLM Inference
Organizations: University of Waterloo Computer Science Waterloo, Ontario, Canada
Abstract
While it is known that quantization of large language models (LLMs) reduces memory usage via lower-bit weights, studies quantifying the resulting impact on energy usage and carbon intensity are scarce. We present the first unified evaluation of weight-only quantization strategies for LLM inference across varying input/output lengths and GPUs, highlighting differences in energy efficiency in addition to accuracy degradation and runtime. We study quantized inference on Llama 2 7B, Phi 3.5 Mini Instruct, OLMo 1B, Qwen 2.5 7B, and Qwen 2.5 14B across GLUE MNLI, MMLU, HumanEval, and GSM8K datasets, evaluating 10 post-training quantization (PTQ) strategies on NVIDIA H100, A6000, A100, and L4 GPUs. We identify a novel trend showing that quantization techniques tend to exhibit peak energy efficiency relative to full-precision baselines when inputs are sufficiently long and outputs are short. Furthermore, we show that quantization strategies become marginally more energy-efficient relative to full-precision models as batch sizes increase, though gains are modest. Notably, fused-kernel implementations such as EETQ int8 and Bitsandbytes int8 offer the highest energy savings, up to 4x compared to FP32 on short text generation, with negligible accuracy loss. Finally, we observe that energy usage closely tracks runtime on our evaluated benchmarks, indicating that, in practice, latency optimization can serve as a reliable proxy for reducing the environmental footprint of LLM services. We conclude with suggested directions for strategically selecting low-carbon quantization strategies based on specific inference requirements.
Figures & tables
| Quantization Technique | Symmetric | Asymmetric |
|---|---|---|
| Quanto | ✓ | ✓ |
| HQQ | ✓ | ✓ |
| TorchAO | ✓ | ✓ |
| Bitsandbytes | ✓ | ✗ |
| EETQ | ✓ | ✗ |
| AutoAWQ | ✓ | ✓ |
| Quantization Technique | Per-Tensor | Per-Channel | Per-Group |
|---|---|---|---|
| Quanto | ✓ | ✓ | ✓ |
| HQQ | ✗ | ✓ | ✓ |
| TorchAO | ✓ | ✓ | ✓ |
| Bitsandbytes | ✗ | ✓ | ✓ |
| EETQ | ✗ | ✓ | ✗ |
| AutoAWQ | ✗ | ✗ | ✓ |
| Model | Benchmark | vanilla FP32 | autoawq int4 | Bitsandbytes nf4 | Bitsandbytes int8 | eetq int8 | gptq int4 | hqq int4 | hqq int8 | quanto int4 | quanto int8 | torchao int4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama 2 7B | GLUE MNLI | 0.4318 | 0.4285 | 0.4235 | 0.4290 | 0.4304 | 0.4268 | 0.4325 | 0.4320 | 0.3696 | 0.4316 | 0.4138 |
| GSM8K (10%) | 0.1603 | 0.1298 | 0.1527 | 0.1832 | 0.1679 | 0.0916 | 0.1221 | 0.1527 | 0.1527 | 0.1527 | 0.0992 | |
| HumanEval | 0.1159 | 0.1280 | 0.1098 | 0.1280 | 0.1220 | 0.1280 | 0.1280 | 0.1159 | 0.1280 | 0.1280 | 0.1341 | |
| MMLU | 0.4469 | 0.4445 | 0.4153 | 0.4415 | 0.4449 | 0.4271 | 0.4356 | 0.4440 | 0.4300 | 0.4468 | 0.4242 | |
| Phi 3.5 Mini Instruct | GLUE MNLI | 0.7465 | 0.7152 | 0.6969 | 0.7237 | 0.7413 | 0.6803 | 0.6630 | 0.7477 | 0.6916 | 0.7457 | 0.6694 |
| GSM8K (10%) | 0.7786 | 0.7634 | 0.6489 | 0.8092 | 0.7634 | 0.7252 | 0.6718 | 0.7786 | 0.7710 | 0.7939 | 0.7481 |
| Quantization Strategy | Avg Memory Efficiency Ratio |
|---|---|
| autoawq int4 | 5.73x |
| Bitsandbytes nf4 | 5.11x |
| Bitsandbytes int8 | 3.53x |
| eetq int8 | 3.87x |
| gptq int4 | 4.57x |
| hqq int4 | 3.52x |
LLM Inference Efficiency
Large language model inference efficiency reduces the time, memory, energy, and cost of generating useful outputs.
See all 345 papers