HackerPapers

arXiv:2310.03003cs.CL

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

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

Abstract

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.

arXiv comments
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.DCDistributed, Parallel, and Cluster Computing

On Hacker News

Linked by 2 identifiable commenters in 3 comments across 3 threads, from Jul 2024 to Jan 2025. Found in 2 HN submissions from Jun 2024 to Jul 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments3 threads

    • > what do you think has a bigger impact on someone’s quality of life: 1) operating a home or 2) generating AI images? [...] I would argue most people would weigh the convenience of a house a lot higher. To meaningfully compare directly like this, you'd need to choose two things…

      UkvView on HNParent context

    • I published this as a comment as well, but it's probably worth nothing that the ChatGPT water/power numbers cited (the one that is most widely cited in these discussions) comes from an April 2023 paper (Li et al, arXiv:2304.03271) that estimates water/power usage based off of…

      lhlView on HNParent context

    • > At current trend its going to consume ridiculous amount of electricity for no good reason (and make some more CO2). 5 joules per token[0] * 200 tokens per query * 10 queries per day * 365 days per year = 1.014kWh Which, going by the US's energy mix[1], means a year of…

      UkvView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.