arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.17531cs.LGcs.AIcs.CY
收藏

面向绿色AI:量化大语言模型推理的能效评估

Towards Green AI: Evaluating Energy Efficiency for Quantized LLM Inference

University of Waterloo(滑铁卢大学)

Petar Basta

AI总结:

本文针对LLM量化的能耗影响研究不足问题,评估多模型、多GPU、多数据集的10种PTQ策略,发现长输入短输出时量化能效最优,融合内核实现能效提升最高,延迟优化可替代降低环境足迹。

摘要:

尽管已知大语言模型(LLM)的量化可通过低位宽权重减少内存使用,但量化对能耗和碳强度的影响量化研究却十分匮乏。本文首次针对不同输入输出长度及GPU上的LLM推理,开展仅权重量化策略的统一评估,重点关注能效差异,同时涵盖精度下降与运行时间。研究对象包括Llama 2 7B、Phi 3.5 Mini Instruct、OLMo 1B、Qwen 2.5 7B及Qwen 2.5 14B模型,在GLUE MNLI、MMLU、HumanEval、GSM8K数据集上,针对NVIDIA H100、A6000、A100、L4 GPU评估10种后训练量化(PTQ)策略。研究发现新趋势:当输入足够长、输出较短时,量化技术相对全精度基线会呈现峰值能效;随批量大小增加,量化策略相对全精度模型的能效略有提升,但提升幅度较小。值得注意的是,EETQ int8、Bitsandbytes int8等融合内核实现能效提升最高,在短文本生成中相对FP32最高可达4倍,且精度损失可忽略。最后,观察到评估基准上能耗与运行时间密切相关,表明延迟优化可作为降低LLM服务环境足迹的可靠替代指标。文末给出基于特定推理需求选择低碳量化策略的建议方向。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑