Skip to content
Preprint

Understanding the Energy Scaling of Large Language Model Inference Across Context Lengths and Attention Architectures

Aug 2026 · 0 citations · 21 references
Computer Science

TL;DR

Results show that attention mechanism is the primary factor governing how decode energy scales with context length, and model size primarily determines absolute energy consumption, while batching reduces both energy per generated token and request latency by up to 87%.

Abstract

The growing adoption of large language models (LLMs) has raised increasing concerns about the energy consumption and environmental impact of inference. This paper presents a systematic empirical study of decode-phase energy consumption across representative open-source LLMs employing Multi-Head Attention (MHA), Grouped Query Attention (GQA), and Grouped Query Attention with Sliding Window Attention (SWA) to characterize how attention architecture influences decode-phase energy consumption under varying inference workloads. We evaluate four models across different context lengths, batch sizes, and generation workloads while measuring GPU energy using NVIDIA hardware counters. We examine the effects of context length, attention mechanism, Key-Value (KV) cache growth, and batching on decode-phase energy consumption. Results show that attention mechanism is the primary factor governing how decode energy scales with context length. MHA models exhibit substantially steeper energy growth than GQA models, whereas GQA with SWA maintains nearly constant energy consumption. We further show that model size primarily determines absolute energy consumption, while batching reduces both energy per generated token and request latency by up to 87%. These findings provide practical guidance for selecting energy-efficient LLM architectures and inference configurations.

View source

Similar papers

Preprint Aug 2026

Multi-Level Modeling of Large Language Model Inference Latency and Energy via Hybrid Analytical--Machine-Learning Predictors

HYMELL is introduced, a hybrid three-level framework for estimating LLM inference latency and energy by combining analytical modeling with machine learning (ML), which enables fast, hardware-free design space exploration and energy-efficient optimization.

Saeid Shokoufa, Mohammad Erfan Sadeghi, M. Kamal et al. · 0 citations

Studying quantization trade-offs for efficient inference deployment in machine translation

The experiments show that the trade-off between inference efficiency and translation quality depends not only on the quantization format, but also on the choice of text chunking strategy, as well as on the choice of text chunking strategy.

Jim Zhao, Sohir Maskey, Koen Oostermeijer et al. · 0 citations
Jul 2026

Profiling Lightweight Large Language Models

These results show that selecting lightweight LLMs by size, FLOPs, latency, or accuracy alone can select the wrong deployment candidate; PTME profiling exposes configurations that preserve useful accuracy at lower physical cost.

Tomohiro Harada, Enrique Alba, Gabriel Luque · 0 citations
Jul 2026

RIS-Kernel: A Model-Agnostic Architecture for Long-Context LLM Inference via Sparse Attention

In controlled evaluations at 32,768 tokens, RIS-Stochastic at 1% density and 70 ensemble seeds achieves 75.00% accuracy, outperforming the native dense baseline, demonstrating that sparse attention acts as a regularizer: low density over multiple seeds filters out sequence-level noise, whereas higher density reintroduc...

Anderson R. Santos · 1 citation

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.