arXiv(opens in a new tab)cs.PFOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.32417

Measuring the Energy Cost of Completing Tasks with Quantized Language-Model Agents

Stephen Abkin, Aldric Yang, Alex Flesher, Nitheesh Kodarapu, Deepak Panigrahy, Aakash Tyagi, David Kebo Houngninou

Stephen Abkin, Aldric Yang, Alex Flesher ∗^{*}, Nitheesh Kodarapu ∗^{*}

Deepak Panigrahy, Aakash Tyagi, David Kebo Houngninou

Texas A&M University

Quantization reduces the memory and energy needed to serve large language models (LLMs) and AI agents for coding and data analysis can now run on locally hosted LLMs. In practice, this benefit is commonly benchmarked per output token. Yet an agent calls its model repeatedly, runs tools, and revises its work, and quantization can change both how much the agent generates and whether it succeeds. Existing energy studies either compare quantized models on single requests or measure agents at one fixed precision, overlooking how a change in precision plays out across a complete agent task.

To address this gap, this paper presents the first characterization of the task-level energy trade-offs of model quantization in locally hosted agents. We develop 29 agent tasks with automatic pass/fail checks in six families, ranging from single-answer SQL analytics to multi-step repository bug fixing, and measure CPU and GPU energy per output token and per completed task for 4-bit and 8-bit versions of two open-weight models on bare-metal NVIDIA A100 nodes with llama.cpp.

Our findings reveal that 4-bit precision generally saves energy per token, though whether it saves energy per completed task is task dependent and changes with the model and the execution budget (i.e., limits on turns, tokens, and time). We trace this discrepancy to the extra tokens needed to complete a task in full, which translates into using up to 3.5 times as much energy per completed task. These findings offer actionable guidance for developers and operators choosing model precision for agents, showing how tokens per completed task, set against the per-token saving, reveal whether lower precision completes the work with less energy.

Keywords: energy measurement, quantization, LLM agents, local inference, task completion, energy efficiency metrics

1 Introduction

Quantization is becoming a practical way to run LLMs locally on a single GPU instead of a provider's cluster. Models such as Qwen3 [56] and Devstral [37] can now drive coding and data agents on one GPU, served by engines such as llama.cpp [13] from files that community repositories publish at many precisions, and methods such as Samsung's LittleBit already compress a 13-billion-parameter model into under 1 GB [27]. Capable agents on consumer hardware are still emerging, but agents on a single GPU that an organization owns are already a reality. There, the energy of every completed task arrives on the electricity bill. An operator then chooses the precision of the model's weights to fit its memory and energy budget, and quantization appears to make this choice easy. A 4-bit file needs less memory than an 8-bit one, usually generates each token with less energy, and often keeps accuracy close to the unquantized model [15, 23]. Benchmarks such as TokenPowerBench report exactly this energy per output token [38, 47, 54]. Yet the useful output of an agent is a completed task, not a token. Completing a task can take many model calls, tool runs, and revisions, and a quantized model may need more of them or fail more often. This raises the question, is the cheaper precision per token also the cheaper one per completed task?

An agent turns a per-token saving into task energy only through its behavior. Each extra turn (i.e., model response) adds a model call over a longer context, a response with a malformed tool call wastes a turn, and a wrong submission discards the whole attempt. Quantization can add to

∗^{*}Alex Flesher and Nitheesh Kodarapu contributed equally.

Contact: Stephen Abkin, stephen122204@tamu.edu.

Code and experiment records: https://github.com/stephen122204/mantra-energy/tree/paper-1.

Preprint these costs. Jang et al. [21] show that quantized agents make more failed tool calls and need more model responses and tool calls before finishing, and Pham et al. [42] find that failed attempts carry a substantial energy cost of their own. Because these costs accumulate over the whole task, the task itself is the natural unit of cost. In guidance published in September 2026, Anthropic [40] makes this argument in terms of monetary cost, recommending that developers of coding agents measure what a task costs rather than its price per token, since models with equal per-token prices can cost very different amounts on the same task. Energy behaves the same way, even when both precisions always succeed.

Motivation. Our motivation stems from quantization being one of the most accessible mechanisms a developer has for running agents on their own hardware. Choosing a 4-bit instead of an 8-bit quantized model needs no new hardware and no change to the agent, and it lowers both memory and per-token energy. An agent runs the same kinds of tasks many times, so the energy cost of one precision choice repeats with every task it completes. If the per-token saving carries through to completed tasks, quantization is close to a free energy saving for local agents. If agent behavior erases it, a developer could end up deploying the costlier precision while per-token benchmarks point the other way. This calls for measuring quantization on the tasks an agent completes, where its energy is actually spent.

Goal. To our knowledge, a task-level understanding of quantization’s energy is lacking. Prior work reports energy per token or per request [5, 6, 18, 49], measures agents at a single precision [20, 34, 42], or compares precisions by correct answers on single-turn queries or with energy calculated rather than read from hardware counters [12, 45]. To address this gap, we conduct a controlled empirical study that measures each precision’s energy both per output token and per completed task, and asks whether the two measures favor the same precision. We report the results as four findings for developers and operators choosing model precision for agents, and address four research questions, which Section 5 answers in order.

RQ1: Do energy per token and energy per completed task favor the same precision?

RQ2: Where they differ, how much extra energy per completed task does choosing by energy per token cost?

RQ3: What in the agent’s behavior accounts for the extra energy, such as how much it generates or how often it succeeds?

RQ4: How do the execution budget, the model, and the task set change which precision is cheaper per completed task, and is an unquantized 16-bit model (which needs twice the GPU memory) ever cheaper than the quantized files?

We run the 4-bit Q4_K_M and 8-bit Q8_0 files 1^{1} of Qwen3-30B-A3B [43] on 29 verifiable tasks (i.e., an automatic check decides whether each attempt succeeds) and compare the precision that each measure favors to address RQ1. Where the two measures favor different precisions, which we call a disagreement, we measure the extra energy per completed task to answer RQ2. We trace each difference to how much the agent generates, how often it succeeds, and how much energy it spends outside model calls to answer RQ3. To address RQ4, we repeat the comparison with an expanded budget, a 16-bit reference, Devstral Small 2 [37], and held-out tasks from the BIRD text-to-SQL and EvalPerf code-efficiency benchmarks [28, 31].

Summary of findings. 4-bit uses 6–16% less energy per output token than 8-bit on average over the 29 tasks for both models, so per-token benchmarks favor it almost everywhere (Section 5.1).

1^{1}Q4_K_M and Q8_0 are llama.cpp quantization formats that store most weights in 4 and 8 bits (Section 2.1). We call them 4-bit and 8-bit for short.

Preprint

Yet on some everyday coding and data-analysis tasks, 4-bit uses more energy per completed task, beyond run-to-run variation. On such tasks, 4-bit uses a median of 66% more energy per completed task than 8-bit, and in the worst supported case, 4-bit needs 3.5 times as much energy as 8-bit to complete the same task (Section 5.2). Where the two measures disagree, the extra energy comes from extra tokens, as the precision that is cheaper per token needs a median of 1.6–2.0 times as many tokens per completed task. These tokens arise from malformed tool calls and unnecessary reruns of tests that had already passed, which prolong attempts, as well as wrong answers that cause attempts to fail (Section 5.3). As tasks scale in difficulty, the precision choice becomes more concerned with completion rate, and which precision completes more depends on how much context and how many turns the agent is given (Sections 5.1 and 5.4). These findings hold through a second model, whose costly tasks differ from the first, and the patterns of our task families carry over to held-out benchmark problems, correctly predicting where 4-bit is cheaper per completed task. An unquantized 16-bit model is never clearly cheaper than the quantized files (Section 5.4). We propose that precision should be chosen by measuring energy per completed task for the model and tasks an agent will run, under the circumstances in which it will be deployed.

Contributions. We summarize our main contributions as follows:

  • We characterize the task-level energy of quantized models in locally hosted agents across 29 verifiable tasks in six families and held-out benchmarks (Section 4).

  • We build a measurement harness that runs the agent, attributes CPU and GPU energy to each model and tool call, checks each attempt with hidden verifiers, and charges failed attempts to completions (Sections 3 and 4).

  • We empirically show that agent behavior can outweigh the per-token saving, making 4-bit costlier per completed task on some tasks, by a margin beyond run-to-run variation (Section 5).

  • We derive an identity that splits energy per completed task into energy per token and tokens per completed task, so a lower precision saves energy roughly as long as its extra tokens per completed task stay below its per-token saving (Sections 3.2 and 6.1).

References (23)