arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.03003cs.CLcs.DC
收藏

从词语到瓦特:基准测试大型语言模型推理的能源成本

From Words to Watts: Benchmarking the Energy Costs of Large Language Model Inference

MIT(麻省理工学院);NYU(纽约大学);Northeastern University(东北大学)

Siddharth Samsi, Dan Zhao, Joseph McDonald, Baolin Li, Adam Michaleas, Michael Jones, William Bergeron, Jeremy Kepner, Devesh Tiwari, Vijay Gadepally

AI总结:

本文针对 LLM 推理能耗关注不足的问题,在 V100/A100 与 Alpaca/GSM8K 上基准测试多规模 LLaMA,并在最多 32 个 GPU 的分片多节点环境中分析性能与能耗。

摘要:

大型语言模型(LLM)因其远超此前最先进水平的新型生成能力而迅速普及。这些技术正越来越多地被应用于法律、金融和医学等各个领域。然而,这些模型带来了巨大的计算挑战,尤其是推理所需的计算和能源成本。尽管这些大型模型在现实中(例如 ChatGPT)被频繁调用以执行推理,但推理能源成本受到的关注仍少于训练 LLM 的能源成本。随着这些最先进的 LLM 在各个领域的使用和部署不断增加,更好地理解其资源利用情况,对于节约成本、扩展性能、高效使用硬件以及优化推理策略至关重要。在本文中,我们描述了为研究 LLM 推理的计算和能源利用而开展的实验。我们对不同规模的 LLaMA(Meta AI 开发的近期最先进 LLM)在两代流行 GPU(NVIDIA V100 和 A100)以及两个数据集(Alpaca 和 GSM8K)上的推理性能和推理能源成本进行了基准测试和初步分析,以反映研究和实践中 LLM 所面对的多样化任务/基准集合。我们展示了在多达 32 个 GPU 上通过模型分片进行多节点、多 GPU 推理的结果。据我们所知,我们的工作是最早在此规模上从计算和能源资源角度研究 LLM 推理性能的工作之一。

英文摘要:

Large language models (LLMs) have exploded in popularity due to their new generative capabilities that go far beyond prior state-of-the-art. These technologies are increasingly being leveraged in various domains such as law, finance, and medicine. However, these models carry significant computational challenges, especially the compute and energy costs required for inference. Inference energy costs already receive less attention than the energy costs of training LLMs -- despite how often these large models are called on to conduct inference in reality (e.g., ChatGPT). As these state-of-the-art LLMs see increasing usage and deployment in various domains, a better understanding of their resource utilization is crucial for cost-savings, scaling performance, efficient hardware usage, and optimal inference strategies. In this paper, we describe experiments conducted to study the computational and energy utilization of inference with LLMs. We benchmark and conduct a preliminary analysis of the inference performance and inference energy costs of different sizes of LLaMA -- a recent state-of-the-art LLM -- developed by Meta AI on two generations of popular GPUs (NVIDIA V100 \& A100) and two datasets (Alpaca and GSM8K) to reflect the diverse set of tasks/benchmarks for LLMs in research and practice. We present the results of multi-node, multi-GPU inference using model sharding across up to 32 GPUs. To our knowledge, our work is the one of the first to study LLM inference performance from the perspective of computational and energy resources at this scale.

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

↑