Sustainable LLM Inference for Edge AI: Evaluating Quantized LLMs for Energy Efficiency, Output Accuracy, and Inference Latency
SINTEF(辛泰夫(挪威研究机构));Singapore Management University(新加坡管理大学);Oslo Metropolitan University(奥斯陆城市大学);Kristiania University of Applied Sciences(克里斯蒂安尼亚应用科技大学)
Erik Johannes Husom, Arda Goknil, Merve Astekin, Lwin Khin Shar, Andre Kåsen, Sagar Sen, Benedikt Andreas Mithassel, Ahmet Soylu
本研究在Raspberry Pi 4上评估了28个量化LLM在能效、推理性能和准确率上的权衡,通过硬件级能耗分析与多数据集基准测试,为资源受限环境下的可持续LLM部署提供了可操作的见解。
摘要:
由于计算限制、内存限制、推理速度和能耗问题,在边缘设备上部署大型语言模型(LLMs)面临重大挑战。模型量化已成为实现高效LLM推理的关键技术,它通过减小模型大小和计算开销来实现。在本研究中,我们对来自Ollama库的28个量化LLM进行了全面分析,这些模型默认应用训练后量化(PTQ)和仅权重量化技术,并部署在边缘设备(配备4GB RAM的Raspberry Pi 4)上。我们评估了多个量化级别和任务类型下的能效、推理性能和输出准确率。模型在五个标准化数据集(CommonsenseQA、BIG-Bench Hard、TruthfulQA、GSM8K和HumanEval)上进行基准测试,并采用高分辨率、基于硬件的能耗测量工具来捕获真实世界的功耗。我们的研究结果揭示了不同量化设置下能效、推理速度和准确率之间的权衡,突出了优化资源受限环境中LLM部署的配置。通过将硬件级能耗分析与LLM基准测试相结合,本研究为可持续AI提供了可操作的见解,弥合了现有关于能耗感知LLM部署研究的关键空白。
英文摘要:
Deploying Large Language Models (LLMs) on edge devices presents significant challenges due to computational constraints, memory limitations, inference speed, and energy consumption. Model quantization has emerged as a key technique to enable efficient LLM inference by reducing model size and computational overhead. In this study, we conduct a comprehensive analysis of 28 quantized LLMs from the Ollama library, which applies by default Post-Training Quantization (PTQ) and weight-only quantization techniques, deployed on an edge device (Raspberry Pi 4 with 4GB RAM). We evaluate energy efficiency, inference performance, and output accuracy across multiple quantization levels and task types. Models are benchmarked on five standardized datasets (CommonsenseQA, BIG-Bench Hard, TruthfulQA, GSM8K, and HumanEval), and we employ a high-resolution, hardware-based energy measurement tool to capture real-world power consumption. Our findings reveal the trade-offs between energy efficiency, inference speed, and accuracy in different quantization settings, highlighting configurations that optimize LLM deployment for resource-constrained environments. By integrating hardware-level energy profiling with LLM benchmarking, this study provides actionable insights for sustainable AI, bridging a critical gap in existing research on energy-aware LLM deployment.
Automatic heterogeneous quantization of deep neural networks for low-latency inference on the edge for particle detectors
Palo Alto Networks(帕洛阿尔托网络公司);Google LLC(谷歌有限责任公司);Institute of Physics Belgrade(贝尔格莱德物理研究所);European Organization for Nuclear Research (CERN)(欧洲核子研究组织(CERN));California Institute of Technology(加州理工学院)
Latency and accuracy tradeoffs in Spiking Neural Networks
National University of Singapore(新加坡国立大学);Shanghai Advanced Research Institute, Chinese Academy of Science(中国科学院上海高等研究院);University of Chinese Academy of Sciences(中国科学院大学);Shandong University(山东大学)