Manuscript Offprint
arXiv:2610.32417Measuring 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
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 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).
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).
2.1 Quantized models for local inference
Local deployments commonly serve models with llama.cpp [13] from GGUF files [14], and community repositories publish each model at many precisions. A precision label such as Q4_K_M names a quantization scheme, not only a bit width. Q4_K_M stores most tensors at 4 bits in blocks that share a scale and an offset, and it keeps some attention and feed-forward tensors at 6 bits [24]. Our 4-bit files were also calibrated on sample text, so weights whose inputs are largest on that text are rounded most carefully [1, 2]. Q8_0 rounds weights to 8 bits in blocks of 32 with one scale per block and needs no calibration [33]. A BF16 file holds the original, unquantized weights in 16-bit bfloat16. Because of the shared scales and the 6-bit tensors, each quantized file stores more bits per weight than its label suggests (8.5 for Q8_0 and 4.88 for our 4-bit Qwen file). The 4-bit Qwen file is thus about 30% the size of the 16-bit one rather than a quarter (Figure 1). The Devstral files use the same quantized layouts. Devstral is released in 8-bit floating point, so it has no original 16-bit weights.
Quantized models, including 4-bit ones, often stay close to their unquantized versions on general and code-generation benchmarks [15, 23, 29, 53]. The loss is larger on long-context inputs [36] and
GGUF is the single-file model format of llama.cpp. One file stores the weights together with the tokenizer and the model metadata, so it fully specifies what the engine loads.
Preprint

Fig. 1. Each blue cell is one weight, drawn with a width proportional to its stored bits, and each column holds the same 32 weights of Qwen3-30B-A3B. Yellow cells are the values that each quantized block shares to rescale its weights (one 16-bit scale in Q8_0, and a scale, an offset, and a share of a larger group's scale and offset in Q4_K_M), so they add storage beyond the bit width. The bars give the measured file sizes on one scale, which decide whether a model fits on one GPU. File sizes are in GiB ( bytes), and GPU capacities are in decimal GB.
on realistic agent applications such as simulated science experiments and text games, where 4-bit quantization lowered accuracy by 10 to 15% [8]. Whether quantization lengthens outputs depends on its severity and on the model [32]. The speed and energy saved by a lower precision also depend on the hardware, kernels, and batching, including whether dequantization is fused into the matrix multiplication [3, 6, 7, 44].
2.2 From energy per token to energy per completed task
Units beyond the token. Energy per output token is the common unit of inference benchmarks [38, 47, 54], and studies that compare quantization methods report it beside accuracy without combining the two [18, 49]. Several studies document its limits for whole requests. ML.ENERGY reports energy per response because models differ in verbosity [5, 6]. Energy per request grows with response length [19, 55], and Luo et al. [34] found that enabling a model's thinking mode generated 21 to 75% more tokens per problem at nearly unchanged energy per token. The measured boundary (i.e., which hardware components and periods the energy covers) matters as well. GPU-only telemetry missed 41 to 45% of system energy on one agent server [34].
Charging energy to completions. Several measures already charge cost to successful outcomes. The cost-of-pass of Erol et al. [10] divides the monetary cost of a model's attempts by its success rate. The energy per successful goal of Panigrahy and Tyagi [41] divides the energy of all attempts, including failed ones, by the number of successes, and our energy per completed task (Section 3) applies this goal-level accounting to the CPU packages and GPU board of the machine that runs the model and its tools. Intelligence per Watt relates accuracy on single-turn queries to measured energy across 16-, 8-, and 4-bit models [45], and TokenArena ranks endpoints by estimated joules per correct answer [12]. We build on these measures by computing energy per output token and energy per completed task on the same agent attempts, which shows when the two favor different precisions of one model.
Agents and precision. For agents, Ifath and Haque [20] characterize multi-request workflows under different serving setups, and Luo et al. [34] attribute a coding agent's energy to components and phases, both at a fixed precision. The two closest studies each hold one side of our question fixed. Pham et al. [42] quantify the energy of failed runs of a local 4-bit agent, and Jang et al. [21] vary precision without measuring energy, finding that a quantized agent can succeed as often while making more failed tool calls. We combine the two sides, varying precision and measuring energy on the same attempts, to test whether the extra tokens and failed attempts that a lower precision induces outweigh its per-token saving.
Preprint

(a) One attempt and its measured periods.

(b) Business query.
Fig. 2. Energy accumulates over the model calls, tools, and waiting of the task window, and in the business query of our study (i.e., an SQL query that summarizes sales by customer segment), 4-bit is cheaper per token but costlier per completed task. (a) An example attempt, not to scale. Blue marks are model calls, whose energy is , and the brace spans the task window, whose energy is . Model loading and the research verifier (i.e., the study's final check of the result) are measured separately and excluded from . (b) Ten verified completions per precision of the business query at one million rows, showing tokens per completed task (T/S), energy per output token ( ), and energy per completed task ( ), with bar heights normalized to the 8-bit value and labels giving the 4-bit change.
3 Three Energy Measures
To see when energy per token and energy per completed task favor different precisions, we compute both on the same agent attempts, together with a third measure between them, model-call energy per completed task (Section 3.1). An algebraic identity (Equation (2)) links the three and shows what can change the preferred precision.
3.1 Attempts and the three measures
An attempt is one run of the agent on one task at one precision (i.e., one model file served entirely from the GPU). The attempt starts from a newly loaded model and ends when the agent submits a result or reaches a limit of its execution budget (Section 4.3). During the attempt, the agent alternates between model calls and tool calls and uses each result to decide its next action. After the attempt, a deterministic research verifier checks the submitted result. It is the study's own final check, hidden from the agent and separate from the tests that the agent runs. An attempt that the research verifier accepts is a verified completion, and every other attempt is a failure.
Figure 2a shows how an attempt accumulates energy, which we measure on the CPU packages (i.e., processor sockets) and GPU board (i.e., the whole graphics card) of the machine that runs the model and its tools. The model-call (inference) energy of attempt is the energy recorded during its model calls, in which the model reads its input tokens (the prompt) and generates output tokens. The operational energy is the energy of the whole task window, from the loaded model to the end of the task. It adds every tool call, including agent-requested tests, and the time the machine waits between calls. Model loading and the research verifier are measured separately and excluded from (Section 4.4). We exclude loading because a deployed server loads the model once for many tasks, and Section 5.1 reports the worst case, one load per attempt. We write if attempt is a verified completion and otherwise.
For one precision on one task, we sum four quantities over its valid attempts, those with a complete and undisturbed energy measurement (Section 4.4). They are the model-call energy , the operational energy , the output tokens , and the number of verified completions . Each measure divides one total by another,
Preprint
Lower values are better for all three. Because and divide by verified completions, they also reflect how reliably a precision succeeds, which does not reflect.
• Energy per token, . The model-call energy per output token, the unit that per-token benchmarks report [38, 47].
• Model-call energy per completed task, . It shares its numerator with and its denominator with , so it shows which of the two steps moves the preferred precision (Section 3.3).
• Energy per completed task, . The operational energy per verified completion. It charges every attempt, failed or not, to the completions, following the energy per successful goal of Panigrahy and Tyagi [41].
All three are ratios of sums, so each attempt counts in proportion to its energy and tokens, and one long attempt can outweigh several short ones. A precision that never completes a task (S = 0) has no or on that task, and Section 3.3 covers such tasks.
3.2 The token factor, the boundary factor, and the break-even rule
Energy per completed task is energy per token scaled by the tokens each completion takes and by the energy outside the model calls. Multiplying and dividing by gives , where is the number of output tokens per verified completion, counted over all attempts. Multiplying and dividing by gives , where says how far the energy of the whole task window exceeds that of its model calls. To compare the 4-bit and 8-bit precisions of one model, we mark each total by a subscript 4 or 8 and divide each 4-bit measure by its 8-bit value. We call the per-token ratio and the per-task ratio, and a ratio below one favors 4-bit. Combining the two steps and dividing the 4-bit value by the 8-bit one gives
The token factor compares tokens per completed task. The boundary factor compares how much each precision’s energy grows when the measured boundary widens from the model calls to the whole task window. and favor different precisions exactly when and lie on opposite sides of one.
Tokens per completed task has two parts, the tokens of an average attempt and how many attempts each completion takes. With the completion rate and the mean output tokens per attempt , we have , and the token factor splits into
The length factor grows when 4-bit attempts are longer, and the completion factor grows when 4-bit completes less often.
Splitting O by outcome shows how failed attempts enter . Let and be the mean operational energy of the S successful and the n - S failed attempts, respectively. For ,
Preprint
Each completion carries the energy of one successful attempt plus a share of the failed ones, and the weight grows quickly as the completion rate falls. At each completion also pays for one failed attempt, and at it pays for three.
Even the per-token ratio depends on what the agent did. Each precision's is measured on its own attempts, and a model call spends energy reading its input tokens as well as generating output tokens. A long tool output lengthens the prompt that the next call reads before generating, so an attempt with long tool outputs and short responses has a higher energy per output token.
Break-even rule. Two precisions break even per completed task when they use the same energy to complete it (). A precision that is cheaper per token stays below break-even only while its per-token saving covers the extra tokens it needs. Formally, the token factor times the boundary factor must stay below . For example, in the business query (Figure 2b), 4-bit saves per token, enough to cover up to more tokens (), but it needs more tokens per completed task (all from longer attempts, since both precisions complete all ten), and with a boundary factor of 0.94, the product is , above 1.16, so 4-bit uses more energy per completed task. Counting only the energy of model calls () removes the boundary factor, so the token factor alone must stay below (the dashed curve in Figure 5).
3.3 Choosing a precision by each measure
Each measure picks a precision for every task. The per-token choice is the precision with the lower . The per-task choice is the precision with the lower . Table 1 covers every pattern of completions, including tasks that one precision or neither completes. A task is comparable when both precisions complete it at least three times, so that the choice never rests on one or two lucky attempts. On a comparable task, the two measures disagree when the per-token and per-task choices differ. We also use to locate where a disagreement arises. If already picks a different precision than , the disagreement comes from the tokens each completion takes (i.e., longer or more failed attempts), and if only picks a different precision, it comes from tool and waiting energy.
Table 1. Each pattern of verified completions leads to one per-task choice, and only the first makes a task comparable, so that it enters the counts of disagreements.
| Precisions that complete the task | Per-task choice | Comparable |
|---|---|---|
| Both, at least three times each | Lower | Yes |
| Only one | That precision | No |
| Both, but one fewer than three times | None | No |
| Neither | None | No |
On a disagreement, we report the cost of following the per-token choice as its extra energy per completed task (e.g., means more than the per-task choice).
4 Experimental Methodology
Measuring energy per completed task asks more of an experiment than measuring energy per token, and a fair comparison of two precisions must meet three requirements.
When attempts are independent and identically distributed, O/S also estimates the expected operational energy spent until the first success [41, 52].
Preprint
• Isolate precision. The two precisions of a comparison differ in the model file and share the machine, engine build, tasks, tools, budget, and sampling seeds (Sections 4.1 and 4.3).
-
Verify. A verifier hardened against known shortcuts decides whether each attempt succeeds, and its own energy stays outside the task window (Section 4.2).
-
Attribute. Attempts differ in length and outcome, so we attribute energy to each model call and tool call and charge failed attempts to the completions (Section 4.4).
Figure 3 shows how our harness runs one comparison.
4.1 Testbed and models
Testbed. We run every attempt on bare-metal machines of the Chameleon testbed [25], so no other tenant shares a machine. Each has two AMD EPYC 7763 processors and one NVIDIA A100 GPU with 40 GB of memory (80 GB on one machine). Model and tool work runs on eight cores of the GPU-attached socket, and server memory is bound to that socket's memory (i.e., its NUMA node). These cores use the schedutil frequency governor at 1.5–2.45 GHz with idle states enabled. Every attempt uses these settings, so host power policy is the same for every precision.
Models. We chose two models that differ in architecture and vendor and that fit entirely in the memory of one 40 GB GPU at 4-bit and at 8-bit, so all computation stays on the GPU at either precision. The main model, Qwen3-30B-A3B-Instruct-2507 [43, 56], is an instruction-tuned mixture-of-experts release without a separate thinking mode. It has 30.5 billion parameters, of which 3.3 billion are active per token (i.e., each token passes through a small subset of expert sub-networks, while the file stores all 30.5 billion). The second model, Devstral Small 2 [37], is a dense 24-billion-parameter coding model from another vendor. Both run on llama.cpp [13] at one source revision. The model files are public GGUF conversions [1, 2], identified by hash and used with the original release’s tokenizer and chat template (i.e., the format that turns messages and tool calls into the token sequence the model was trained on).
Precisions. We compare the Q4_K_M and Q8_0 files, which differ in bit width, quantization scheme, calibration (Section 2.1), and kernels. A developer chooses a file (not a bit width), so we measure the joint effect of all four. The Qwen 16-bit file needs 57 GiB (Figure 1), so we run the 16-bit reference on the 80 GB machine, where every precision fits entirely in GPU memory at the largest context we use.
4.2 Tasks and verification
Energy per completed task needs a completion criterion that is objective, reproducible, and identical for every precision, so we use verifiable tasks, whose result an automatic check accepts or rejects, as repository-level coding benchmarks do [22]. Success is then simply pass or fail, which keeps the variance of a judged or graded score out of the energy comparison. Some problems come in two input sizes, and counting each size as a task gives 29 tasks from 22 problems (Table 2).
Task families. The tasks cover everyday agent work, from a single SQL query to repository repairs of up to 250 turns (i.e., model responses). Each of the six families lets precision change the energy of a task in its own way. We wrote the first three.
- SQL analytics (6). The agent explores a sales database and submits one structured answer, so one wrong submission fails the attempt.
• Data repair (2). The agent writes SQL that cleans and totals event records and can test it on a visible database, so failed tests and repairs add energy within the attempt.
llama.cpp revision fcc8915, built with CUDA on each machine with the same options.
Preprint

Fig. 3. In one comparison, every precision runs on each task with the same tools, budget, and seeds, in a seeded random order. Each attempt yields energy, token counts, a pass/fail result, and validity checks. Sums over valid attempts, failed ones included, give each precision's and .
Table 2. An automatic check decides success in every family. Each row shows one example task.
| Family | Tasks | Example task | Success check |
|---|---|---|---|
| SQL analytics | 6 | Report the number of transactions and the net amount for every customer segment in a sales database, as one structured answer (the business query). | Equals an independent, non-SQL reference |
| Data repair | 2 | Write SQL that keeps only the latest version of each event, drops unpaid events, and totals net amounts by region. | Correct on the given and five further databases |
| Regression control | 2 | Fit a regression per group with the provided tool and report count, slope, intercept, and error. | Matches the reference within |
| Data processing | 4 | Implement a function that removes repeated URLs but keeps records flagged to keep, in input order. | Correct on visible, private, and edge-case inputs |
| Function implementation | 6 | Return the two closest numbers in a list (HumanEval/20), fast enough for large inputs. | Correct on hidden inputs within 2 s |
| Repository repair | 9 | Find and fix a defect injected into the breadth-first connected-components code of NetworkX. | Matches independent implementations on random graphs, and the package's tests pass |
-
Regression control (2). The tool does the fitting and the agent reports the result, so energy differences in this family come only from the agent's behavior (its model calls and any repeated tool calls).
-
Data processing (4). The agent implements and tests a pandas or NumPy function. The problems adapt DS-1000 [26], a set of data-science problems written against these libraries.
-
Function implementation (6). The agent writes and tests a function that must be correct and finish within a time limit. The problems adapt EvalPerf [31], whose inputs stress running time, with HumanEval+ and MBPP+ inputs [30].
-
Repository repair (9). The agent locates and fixes one injected defect in NetworkX 3.4.2 [17], a widely used Python library for graph algorithms, over many turns of reading, searching, and testing.
The adapted tasks use our agent's tools rather than each benchmark's original setup, so their completion rates compare the two precisions under one agent.
Preprint
Verification. The research verifier alone decides success, so it must be resistant to gaming. It runs once after submission and checks the result against references hidden from the agent, which it computes independently of the agent's approach. It ignores what submitted code reports about its own success. Wherever an agent could pass by hard-coding the answer for the input it was shown, it reruns the check on new inputs generated from private seeds. Before use, every verifier had to accept the reference solutions and reject known shortcuts (e.g., constant answers, answers hard-coded for the visible input, and forged success messages). During a task, read-only SQL access and a Landlock ruleset [46] keep hidden inputs, expected outputs, and private seeds out of the agent's reach (Appendix A).
4.3 Agent protocol, budgets, and repetitions
Inference server. Each attempt starts a new inference server that serves one request at a time, so no cached state or warm-up carries over between attempts. Within an attempt, the server keeps the computation already done for earlier turns (i.e., the key-value cache) and processes only the new part of each prompt. The harness renders the conversation (including the tool definitions) with the model's own chat template and sends the token identifiers to the native completion endpoint of llama.cpp on the same machine, so it controls exactly which tokens each precision reads.
Turns and tool actions. The system message asks the model to solve one task with the provided tools and to finish by submitting. Each family offers one task tool in place of a general shell, which helps keep hidden material out of the agent's reach. The tool has a few actions (e.g., for SQL analytics, inspecting the schema, running a read-only query, and submitting). Tool calls run one at a time between model calls, each in a new process, so every call's energy is measured separately. The parser accepts only well-formed tool calls in the chat template's format and repairs nothing except a missing closing tag at the end of a response. When a response has no valid call, the harness keeps its text without the rejected call and replies with the parser error, so the response costs a turn at any precision. The harness saves every response, tool call, and tool result and labels each turn (e.g., a malformed call), and Section 5.3 counts agent behaviors from these records.
Setting the budgets. Limits on context, turns, tool calls, output tokens, and time keep every attempt finite, and together they form its execution budget (Table 3). We fixed the primary budget after pilot runs, setting each limit above what pilot attempts outside repository repair needed (e.g., a 600 s deadline well above the longest pilot attempt, and 2,048 tokens per turn for answers of about 1,100 tokens). The expanded budget’s turn limit equals the step limit of mini-SWE-agent [50, 57] for SWE-bench [22], where a step is also one model response. Its context is the largest at which every precision fits entirely in GPU memory. The model supports contexts of up to 262,144 tokens, and the harness keeps the full conversation without truncation or summarization.
Outside repository repair, the limits rarely end a valid sampled attempt. With the primary budget, 389 of 399 attempts on the other families end by submitting, and with the expanded budget, all such attempts end by submitting. However, about two thirds of primary-budget repository attempts end at the context or turn limit for both precisions, which motivates the expanded budget. The limits on tool calls, total output tokens, and time each end at most one valid sampled attempt (Table 8 in Appendix B).
Repetitions and order. A repetition is one attempt on every task at each precision, and repetition k uses seed k for every precision. The first repetition uses greedy decoding, which always takes the most probable next token and makes the attempt repeatable. Later repetitions sample each token at random, using the settings recommended on each model card (Table 3). Intervals and tests use only
Landlock is a Linux kernel feature that restricts which files and network connections a process can reach.
Preprint
Table 3. The expanded budget raises every limit of the primary budget, and decoding is the same under both. Greedy decoding takes the most probable token, which makes the greedy repetition deterministic, and sampled repetitions draw tokens at random with the model-card settings.
| Limit or setting | Primary budget | Expanded budget | Definition |
|---|---|---|---|
| Limits | |||
| Context (tokens) | 16,384 | 65,536 | Context window of the inference server |
| Turns | 24 | 250 | Model responses, including malformed ones and the submission |
| Tool calls | 48 | 500 | Task-tool calls per attempt |
| Output tokens | 8,192 | 65,536 | Total over the attempt |
| Output tokens per turn | 2,048 | 4,096 | Limit of one response |
| Deadline (s) | 600 | 1,800 | From attempt start, including model loading and verification |
| Decoding | |||
| Greedy repetition | temperature 0, top-k 1 | First repetition of each task and precision | |
| Sampled, Qwen | temperature 0.7, top-p 0.8, top-k 20 | Model card [43] | |
| Sampled, Devstral | temperature 0.15, top-p 1 | Model card examples [37] | |
| Seeds | seed k in repetition k | The same for every precision | |
these sampled repetitions. To keep slow host changes (such as chip temperature) from favoring either precision, the precisions of each task run in a seeded random order. Attempts run one at a time, with 45 s between them for power to settle. Any drift in energy per token across repeated identical attempts affects both precisions alike (Appendix D).
4.4 Energy measurement and attempt validity
Energy counters. Every 0.1 s, we read cumulative energy counters for both CPU packages through Linux powercap [51] and for the GPU board through the NVIDIA Management Library [39]. The energy of an interval is the difference of two readings. It includes idle energy within the interval and excludes DRAM, storage, fans, and power-supply losses. AMD package counters are estimates from a power model [48], and the GPU sensor samples power intermittently [58], so we compare precisions on the same machine. If a sensor reads high or low by the same factor for both precisions, the 4-bit/8-bit energy ratio stays the same, and so does the precision it favors.
Measured periods. An attempt has three measured periods (Figure 2a). Model loading and verification are reported in Appendix C, and the task window between them gives . Within the window, each model call and tool call is a span whose energy is interpolated between the 0.1 s counter readings, and sums the energy of the model-call spans.
Valid attempts. A valid attempt, one whose measurement is complete and undisturbed, passes three checks:
- Its energy record is complete, and recomputing it from the raw counter readings gives the stored value (Appendix C).
• Its token counts add up (i.e., reused plus newly read input tokens equal the input length).
- No process it started (e.g., a tool or server process) is still running when it ends, and a monitor that samples CPU use about every 0.6 s finds no sustained activity by unrelated processes.
Preprint
Invalid attempts are reported in the attempt totals of Table 4 but are kept out of the energy and completion counts, and none are rerun, since replacing them would let outcomes decide which attempts count. The harness records the cause of every failure (e.g., a wrong answer, a program error or timeout, a missed time limit, or a budget limit). An attempt that the deadline interrupts during generation has an incomplete energy record, because the server stops before the final counter reading, so it is invalid. Appendix D counts it as a failure with energy rebuilt from the readings taken before the deadline and shows that the results of Section 5 still hold. Table 4 counts the valid attempts.
4.5 Conditions
Each row of Table 4 is a condition, one combination of tasks, model, budget, and machine under which we compare the precisions. The main experiment runs Qwen at 4-bit and 8-bit on all 29 tasks with the primary budget. The next three conditions test whether its result holds with a larger budget or another model. The repository rerun repeats the repository tasks with the expanded budget on the same machine. Qwen expanded runs all tasks with the expanded budget and adds the 16-bit reference, which needs the 80 GB machine. Devstral runs all tasks with the second model and the expanded budget. Because a condition can change more than one of model, budget, and machine, we compare precisions within each condition and report differences between conditions descriptively.
Held-out tasks. The held-out tasks extend the comparison to benchmark problems outside our task set. They include 40 simple questions on 11 databases of BIRD [28], a text-to-SQL benchmark over real databases judged by its official execution-match rule [4]. For example, one question asks for the eye color of the superhero whose full name is Karen Beecher-Duncan. They also include the 37 eligible EvalPerf problems [31] unused in the main experiment, such as HumanEval/0, which asks whether any two numbers in a list are closer than a threshold. We selected both subsets by rules independent of how any model performed (Appendix E). To test whether the patterns of our task families carry over to new problems, we made two predictions from the main experiment's early results (Section 4.6) before running any held-out task. Because SQL analytics favored 8-bit and function implementation did not, we predicted that 4-bit would use less energy per completed task on the function-implementation problems of EvalPerf and that 8-bit would match or beat it on the SQL questions of BIRD. Section 5.4 tests both.
4.6 Statistical analysis
Statistical support. Repeated attempts show whether a choice is more than noise. Each condition uses the sampled repetitions that are complete at every precision, and partly completed repetitions are reported separately (Appendix D). For each task, we compute the 4-bit/8-bit ratio of each of the three measures over these repetitions. A choice is statistically supported when the 95% bootstrap interval of its ratio lies entirely on the chosen side of one. An interval that includes one supports neither precision. The interval comes from 5,000 draws that resample each precision's valid attempts [9]. When only one precision completes a task, the choice rests on completion counts and is supported when an exact test gives (McNemar's for attempts paired by seed, Fisher's otherwise [11, 35]). A disagreement is supported when both of its choices are supported on the same attempts.
Noise baseline. Because every task gets its own test, a few tasks could look like supported disagreements by luck alone, and the noise baseline (i.e., a label-permutation test [16]) measures how many to expect. After the runs, we randomly swap the 4-bit and 8-bit labels among each task's recorded attempts (i.e., in each repetition, a coin flip decides whether the 4-bit and 8-bit attempts
Preprint
Table 4. Each later condition departs from the main experiment (first row) as listed. Repetitions count one greedy repetition plus the sampled ones. Valid gives valid attempts over all attempts.
| Condition | Tasks | Changes from the main experiment | Machine | Repetitions | Valid |
|---|---|---|---|---|---|
| Main experiment | 29 | None (Qwen, 4-bit and 8-bit, primary budget) | A, 40 GB | 1+10 | 636/638 |
| Repository rerun | 9 | Repository tasks only, expanded budget | A, 40 GB | 1+10 | 196/198 |
| Qwen expanded | 29 | Expanded budget, 80 GB machine, adds 16-bit | D, 80 GB | 1+6 | 609/609 |
| Devstral | 29 | Devstral with its chat template, sampling, and tool-call syntax, expanded budget | B, 40 GB | 1+10 | 637/638 |
| Held-out | 77 | BIRD and EvalPerf tasks | C, 40 GB | 1+2 | 462/462 |
trade labels, so the label no longer tells which precision produced it). Each attempt keeps its real energy and outcome, so any disagreement that remains comes from luck alone. Each shuffle yields some number of supported disagreements by luck alone. Repeating the shuffle many times shows how often luck reaches the number we observe, and if it rarely does, the observed count is unlikely to be luck. A second shuffle keeps each task's real per-token gap (Appendix E).
Summaries across tasks. A condition or family is summarized by its average (i.e., the geometric mean of its task-level ratios), weighting a problem with two input sizes as one problem. Because a geometric mean lets a halving and a doubling cancel, an average near one (i.e., no overall difference) can hide tasks that strongly favor either precision. Intervals for these summaries come from 2,000 draws that resample attempts within tasks, or for held-out tasks from 5,000 draws that resample tasks and then attempts (Appendix E).
Confirmatory and exploratory analyses. After the pilot runs and before the main experiment, we fixed the tasks, tools, verifiers, primary budget, measured periods, validity rules, and the plan to compare with . The main experiment tests this plan. After seeing its early results, we added the expanded budget, the held-out tasks with their predictions, and the second model. These extensions are exploratory, and so are later analyses such as the retest on separate repetitions and the model-loading case.
5 Results
We answer the four research questions from Section 1 in turn, asking whether the two measures favor the same precision (RQ1), how much choosing per token costs (RQ2), where the extra energy comes from (RQ3), and what changes the cheaper precision per completed task (RQ4). All ratios are 4-bit over 8-bit, so values below one favor 4-bit. The three conditions that run all 29 tasks are the main experiment (Qwen with the primary budget), Qwen expanded, and Devstral. A median attempt uses 2–7 kJ over 15–31 s, and a held-out attempt uses about 1 kJ over 12–14 s (Table 5).
5.1 RQ1: Whether the two measures favor the same precision
Energy per token favors 4-bit almost everywhere, yet energy per completed task favors 8-bit on some tasks in all three conditions (Figure 4). 4-bit uses 6–16% less energy per output token than 8-bit on average over the 29 tasks, depending on the condition, and is cheaper on 25 to 29 of them.
Of the 23, 21, and 26 comparable tasks in the three conditions (i.e., tasks that both precisions complete at least three times), the two measures favor different precisions on 10, 10, and 8 tasks respectively. Chance alone could produce most of these, as the noise baseline (Section 4.6), keeping
Preprint

Fig. 4. 4-bit is cheaper per token for nearly every task, and black rings mark the three tasks per condition where it is costlier per completed task beyond run-to-run variation. Each point is a comparable task, placed by its 4-bit/8-bit ratio of energy per output token (horizontal) and of energy per completed task (vertical), on log scales. Points in the two shaded quadrants are disagreements.
each task’s per-token gap, yields 8.6, 8.2, and 4.8 disagreeing tasks on average (Appendix E). We thus count only supported disagreements, whose two gaps both exceed run-to-run variation. Three remain in each condition, and at most 3% of shuffles produce three or more, so chance alone rarely yields this many. For Qwen, these are the business query at both input sizes (8,192 and one million rows) and one regression-control task. For Devstral, these are one data-repair, one regression-control, and one repository-repair task. The same three Qwen tasks recur at both budgets, on different machines and separate repetitions, so they reflect the tasks rather than one machine or one set of runs.
The other 6, 8, and 3 tasks (29 minus the 23, 21, and 26 comparable ones) are the hardest, as at least one precision completes them fewer than three times, so we compare completion counts instead. For Qwen, the budget decides which one completes more (Section 5.4). Under the primary budget, 8-bit completes the hardest repairs more often (7 completions against 2 for 4-bit in the main experiment), and under the expanded budget, 4-bit does (13 against 3 in Qwen expanded).
Model loading. Even in the worst case of Section 3.1, one model load per attempt, the business query at 8,192 rows stays a supported disagreement for Qwen at both budgets, and for Devstral, the regression-control task at 8,192 rows and the repository-repair task also stay supported disagreements. A 4-bit load takes 0.4–0.7 kJ less than an 8-bit one (Appendix C). Loading thus moves the condition averages (i.e., geometric means of the task-level ratios) per completed task toward 4-bit by 0.02 to 0.12, and removes some disagreements without creating any.
Finding 1. A precision that is cheaper per token can cost more per completed task. 4-bit uses 6–16% less energy per token on average, yet in each condition, three tasks cost more per completed task at 4-bit by more than run-to-run variation, such as the SQL business query for Qwen and the repository repair for Devstral (Figure 4). On the business query at one million rows, for example, 4-bit uses 14% less energy per token but 29% more per completed task (Figure 2b).
Preprint
5.2 RQ2: The cost of choosing by energy per token
Where the two measures disagree, following energy per token is expensive. On the supported disagreements, the per-token choice (i.e., the precision with the lower energy per token, Section 3.3) uses a median of 66% more energy per completed task than the per-task choice (i.e., the precision with the lower energy per completed task, Figure 4). It ranges from 29% more on Qwen's business query at one million rows to 3.5 times as much at 8,192 rows. 8-bit spends about the same energy per completed task at both sizes, so the larger cost at 8,192 rows comes from 4-bit, which took eight turns per attempt rather than three and generated about four times as many tokens as 8-bit.
Condition averages (Section 4.6) dilute this cost, because tasks that favor each precision offset each other. The average 4-bit/8-bit ratio per completed task is 1.17 in the main experiment (17% more for 4-bit) and 0.92 in Qwen expanded and for Devstral (8% less). Such an average suggests a modest difference either way, while single tasks cost up to 3.5 times as much.
Retest on separate repetitions. To check that the cost holds on new runs, as it would for an operator who chooses a precision from past runs, we find supported disagreements using one half of the repetitions and measure their cost on the other half, then swap the halves. For Qwen, the per-token choice still costs a median of 31% and 45% more per completed task at the two budgets, less than the 66% above but still large. The per-task choice stays cheaper in 10 of 11 cases. For Devstral, the per-task choice stays cheaper in 2 of 5.
Finding 2. Choosing by energy per token can be costly. On the tasks of Finding 1, the precision that is cheaper per token uses a median of 66% more energy per completed task, and up to 3.5 times as much. For Qwen, the extra cost persists at a median of 31–45% on separate repetitions, and averages over all tasks dilute it (Figure 4).
5.3 RQ3: Where the extra energy comes from
The extra energy comes from extra tokens (Figure 5). Across all disagreeing tasks, supported or not (Equation (2) holds exactly on each), the precision that is cheaper per token needs a median of 1.6 to 2.0 times as many tokens per completed task in the three conditions (the token factor of Equation (2)). A per-token saving of 6–16% covers at most 6–19% extra tokens (Section 3.2), so these token factors lie far past break-even. Per-token ratios cluster between 0.8 and 1, while the token factor varies by more than ten times, so tokens per completed task largely decide which precision is cheaper. Tool and waiting energy (the boundary factor) changes the per-task choice on at most one disagreeing task per condition, so nearly all disagreements arise inside the model calls.
Longer attempts and failed ones. Under the primary budget, failed attempts (the second term of Equation (4)) carry the bulk of the extra energy per completed task in most disagreeing tasks (7 of 10), and under the expanded budget, longer attempts carry that extra energy. On SQL analytics in the main experiment, Qwen submits a wrong answer about three times as often at 4-bit as it does at 8-bit (20 rather than 6 out of 60 attempts). Even its successful 4-bit attempts generate about 1.8 times as many tokens. In the 18 disagreeing tasks of Qwen expanded and Devstral, the precision that is cheaper per token generates a median of 1.5 to 1.8 times as many tokens per attempt (the length factor of Equation (3)), but completes as often (a median completion factor of one). In these tasks, the extra energy comes mainly from longer attempts.
What the agents did differently. In the saved traces, the extra tokens include malformed output, narrated plans (i.e., text describing the next step before each tool call), and repeated tests. For SQL analytics, Qwen's tool call is missing or malformed nine times as often at 4-bit as it does at 8-bit (27 rather than 3 out of 60 attempts). Even when both precisions always succeed, 4-bit
Preprint
Table 5. 4-bit has the lower median energy per token in the three conditions that run all 29 tasks, while medians per attempt and per completed task differ little, and wide interquartile ranges show long attempts in the expanded-budget conditions. Entries are medians over valid sampled attempts, with interquartile ranges in parentheses. Energy per completed task is the median across tasks that both precisions complete at least once. Medians pool tasks, so they can differ from the task-level ratios of Figure 6.
| Condition, precision | J per token | kJ per completed task | kJ per attempt | s per attempt | Output tokens per attempt |
|---|---|---|---|---|---|
| Main experiment, 4-bit | 2.38 (2.24–2.98) | 2.5 (1.3–5.3) | 2.0 (1.2–3.8) | 16 (13–22) | 501 (391–823) |
| Main experiment, 8-bit | 2.64 (2.46–3.20) | 2.2 (1.5–8.3) | 2.3 (1.3–5.2) | 19 (16–29) | 501 (374–836) |
| Qwen expanded, 4-bit | 2.69 (2.50–3.53) | 2.0 (1.4–3.7) | 2.1 (1.3–16.5) | 15 (13–125) | 574 (417–869) |
| Qwen expanded, 8-bit | 2.92 (2.71–3.88) | 2.0 (1.4–3.5) | 2.0 (1.4–17.1) | 18 (16–129) | 558 (397–1195) |
| Devstral, 4-bit | 10.1 (9.9–11.5) | 7.5 (3.9–35.3) | 6.6 (3.3–28.3) | 30 (19–173) | 576 (312–1336) |
| Devstral, 8-bit | 12.2 (12.0–13.7) | 7.7 (4.4–34.7) | 6.7 (3.9–28.6) | 31 (23–173) | 520 (297–1307) |
| Held-out, 4-bit | 3.01 (2.39–3.59) | 0.86 (0.77–1.22) | 0.90 (0.76–1.19) | 12 (11–13) | 238 (160–391) |
| Held-out, 8-bit | 2.96 (2.60–3.77) | 0.96 (0.81–1.34) | 0.99 (0.78–1.31) | 14 (13–15) | 262 (165–396) |

Fig. 5. Extra tokens outweigh the per-token saving. Filled markers, the disagreeing tasks of Figure 4, lie almost all in the shaded regions. Each comparable task is placed by its 4-bit/8-bit ratio of energy per output token (horizontal) and of tokens per completed task (vertical), on log scales. On the dashed curve , the two precisions break even in model-call energy per completed task. Shaded regions mark where that energy and energy per token favor different precisions.
can work less efficiently. In the business query of Figure 2b, all 20 attempts ran the same schema lookup and the same single query and ended with the same correct answer. However, the 4-bit model used about more output tokens (430 on average, where 8-bit used 271 every time). In most of its attempts (6 of 10), it first submitted a numerically correct answer one closing brace short, which the parser rejected, so it submitted again, and in 3 others it described its plan before each call. Devstral at 4-bit drops the same brace just as often on a regression-control task (6 of 10 attempts), which helps explain why 8-bit is cheaper on regression control. In a repository repair that Devstral completed in all ten attempts at both precisions, 4-bit took about more turns (a
Preprint median of 18.5 rather than 11) and re-ran already passing tests about twice as often (3.3 rather than 1.7 times per attempt).
Finding 3. Extra tokens drive the cost. Where the two measures disagree, the precision that is cheaper per token needs a median of 1.6 to 2.0 times as many tokens per completed task, more than its per-token saving can cover (Figure 5). The extra tokens come from (1) longer attempts, as malformed tool calls, narrated plans, and repeated tests add tokens even to successful attempts, and (2) failed attempts, which dominate the extra energy on most of these tasks.
5.4 RQ4: What changes the cheaper precision per completed task
Across conditions, 4-bit's per-token saving persists while the cheaper precision per completed task varies (Figure 6). The per-token ratio lies below one in every condition (clearly so in all except BIRD and the repository rerun, which repeats the nine repository repairs with the expanded budget). However, per completed task, only the EvalPerf condition average clearly favors 4-bit. The tasks where 4-bit costs more per completed task differ between the two models, and for Qwen, the budget decides which precision completes more of the hardest repairs.
Task families. Families favor different precisions across conditions (Table 6). SQL analytics favors 8-bit in the main experiment but favors 4-bit for Devstral, regression control favors 8-bit in Qwen expanded and for Devstral, and data processing favors 4-bit in Qwen expanded and for Devstral. In the main experiment, the regression-control average (0.47) hides a supported disagreement, because 4-bit uses far less energy per completed task at 8,192 rows (0.13, about an eighth of 8-bit's) but uses more at one million rows (1.72, or 72% more).
Expanded budget. With the expanded budget, Qwen at 4-bit completes more repository repairs, while per completed task the two precisions stay within run-to-run variation. Summed over the nine repairs, both precisions complete 28 under the primary budget (out of 89 and 90 attempts), with 8-bit ahead on the hardest ones (Section 5.1). About two thirds of these attempts end at the turn or context limit (Section 4.3). However, in the repository rerun, 4-bit completes about 70% more repairs than 8-bit (45 rather than 26 out of 89, p = 0.006, Appendix D), and Qwen expanded shows the same gain (27 rather than 16 out of 54). Nearly half of the rerun's gain comes from one repair that 4-bit completed in 9 of 10 attempts and 8-bit completed in none, because 8-bit kept working until it reached the turn or context limit (about 220 turns per attempt on average, against about 30 for 4-bit). Devstral, run only with the expanded budget, completes 75 out of 90 repair attempts at each precision. Per completed task, the rerun's ratio is 0.71 [0.32, 1.24], or about 29% less energy for 4-bit.
16-bit reference. In Qwen expanded, the condition that adds the 16-bit reference, 16-bit uses 31% more energy per token than 8-bit and 14% more per completed task [0.93, 1.49]. Quantizing from 16-bit to 8-bit thus saves energy per token, and per completed task it leaves a 14% gap within run-to-run variation. Energy per token picks a quantized file on every task, and the three tasks where the per-task choice picks 16-bit are all within run-to-run variation.
Held-out tasks. For Qwen, the patterns of our task families carry over to new benchmark problems, as both predictions stated in Section 4.5 hold. On EvalPerf, 4-bit uses less energy per completed task (0.90 [0.85, 0.98], or 10% less) and completes about as often (65 out of 74 attempts at 4-bit and 68 out of 74 at 8-bit). A partly finished repetition on another machine widens the interval to [0.79, 1.01] (Appendix D). On BIRD, as predicted, neither precision is supported per completed task (0.91 [0.77, 1.09]).
Preprint

Fig. 6. The per-token ratio (circles) lies below one in every condition, while the per-task ratio (squares) falls on both sides of one. Each row shows geometric-mean 4-bit/8-bit ratios over problems, and the per-task ratio is taken over the problems that both precisions complete. Bars are 95% bootstrap intervals from 2,000 draws over attempts (5,000 draws over tasks and attempts for EvalPerf and BIRD).
Table 6. The family that favors each precision changes across conditions. Shaded bold cells mark families whose 95% bootstrap interval (2,000 draws) excludes one, orange where 4-bit is favored and blue where 8-bit is favored. Entries are family-level 4-bit/8-bit ratios of energy per completed task, as geometric means over the problems of each family.
| Family | Main experiment | Qwen expanded | Devstral |
|---|---|---|---|
| SQL analytics | 1.74 | 1.13 | 0.88 |
| Data repair | 0.74 | 1.18 | 1.44 |
| Regression control | 0.47 | 1.25 | 1.18 |
| Data processing | 0.93 | 0.66 | 0.59 |
| Function implementation | 0.99 | 0.92 | 0.96 |
| Repository repair | 1.54 | 0.83 | 0.91 |
Finding 4. Across a second model, a larger budget, and held-out tasks, 4-bit stays cheaper per token, but the task families that favor each precision per completed task change. SQL analytics favors 8-bit in the main experiment (1.74) but 4-bit for Devstral (0.88), data processing favors 4-bit under the expanded budget (0.66 and 0.59), and held-out benchmarks match the predictions made before they ran (EvalPerf 0.90). 16-bit uses 31% more energy per token than 8-bit and is never clearly cheaper per completed task (Figure 6, Table 6).
6 Discussion
6.1 Choosing a precision in practice
A deployment can check which precision is cheaper per completed task from token counts and the per-token saving. By the break-even rule (Section 3.2), 4-bit stays cheaper only while its per-token saving covers the extra tokens it needs, and a saving of 6–16% covers at most 6–19% more tokens per
Preprint completed task in model-call energy. We thus suggest that developers track tokens per completed task to see which precision is cheaper, using the logs of repeated attempts at each precision.
For developers of local agents.
- Short coding functions. A developer whose agent mostly writes and tests short functions can start with 4-bit. On our function-implementation and held-out EvalPerf tasks, 4-bit used the same or less energy per completed task on average.
• Structured SQL answers. A developer whose analytics agent answers business questions with one structured SQL result should compare both precisions on a sample of their own questions, with several attempts each. In our SQL analytics family, 8-bit used less energy per completed task in one condition and 4-bit in another (Table 6).
- Long repository sessions. In long sessions with a large context window and many turns, 4-bit completed at least as many repairs as 8-bit in every condition with the expanded budget (Section 5.4). A developer whose agent works through long sessions on a code base can thus start with 4-bit and switch to 8-bit where 4-bit's extra tokens per completed task exceed what its per-token saving covers on their own tasks.
For benchmark and measurement designers. Five practices make agent energy results comparable across studies, and per-attempt records let others recompute both measures under another boundary.
(1) Report energy per completed task beside energy per output token.
(2) Charge failed attempts to the completions.
(3) Repeat attempts, and compare per-task differences with run-to-run variation.
(4) State the energy boundary (e.g., CPU packages and GPU board, or wall power), whether model loading is included, the budget, and the number of repetitions.
(5) Include the tests the agent runs while working in its task energy, and exclude the separate check that scores its final result.
6.2 Scope and limitations
Deployment setting. We study one agent that sends one request at a time to an open-weight model of 24 or 30 billion parameters, resident on a dedicated GPU and served by one engine, with model loading excluded as for a server that stays loaded (Section 3.1). This setting charges all energy in the task window to one task and keeps model calls, tools, and host activity separable. Shared or batched serving would divide idle and host energy among tenants. Our machines cover two memory sizes of one GPU generation and one processor family.
Agent interface and budgets. Each task family offers a few tool actions in place of a general shell, and a response with a malformed tool call costs a turn (Section 4.3). This strict protocol charges each precision for its own malformed output under the same rule, which is one source of the extra tokens (Section 5.3). A deployment could reduce this cost for both precisions by repairing malformed calls or by constraining the output format with a llama.cpp grammar, and energy per completed task would show how much it saves. Both precisions share one budget, as under a single deployment policy, and a budget set for each precision could give 4-bit the longer context that its smaller file allows.
Task set and verification. We study a fixed set of verifiable tasks, because an automatic check, as in SWE-bench and BIRD [22, 28], makes completion directly measurable at every precision. The held-out benchmarks test whether the patterns of our task families carry over beyond this set (Section 5.4). A repository patch counts only when it passes the verifier, as in SWE-bench,
Preprint so the energy of partly correct patches is charged to the completions. Open-ended work such as web interaction, research, or planning would add judged or graded outcomes. Our tasks represent the short and medium-length work of a local agent, and the same per-task accounting applies to multi-hour projects and to models with a thinking mode, which raises energy per problem at nearly unchanged energy per token [34]. On longer and harder tasks, where completion rates fall, failed attempts weigh more in each completion's energy (Equation (4)), so the per-task measure matters more there. The precisions of one model share their base weights, so both saw the same training data, and privately seeded verifier inputs limit what a model gains from having seen public benchmark problems during training.
6.3 Reproducibility
The per-attempt records let others recompute every reported energy and completion figure. Each attempt with a complete measurement record stores its settings, raw energy-counter readings, the time span of each model and tool call, token counts, the verifier decision, and its validity checks, and every incomplete or invalid attempt is logged with its reason. File hashes identify the plans, model files, task assets, and the analysis scripts behind the reported intervals and figures, and one manifest file records the machine, tool interface, and harness version of each condition. Upon acceptance, we will release the code, task definitions and verifiers, run settings, and per-attempt records on Zenodo, and identify by source and version any third-party asset whose license prevents redistribution.
7 Conclusion
Quantization is making it practical to run agents on a single local GPU, and we asked whether a precision that is cheaper per token is also cheaper per completed task, a question for quantized models in general. Measuring both on the same attempts of locally hosted coding and data agents, we find that 4-bit is cheaper per token almost everywhere, while the cheaper precision per completed task depends on the task, the model, and the execution budget. We trace the difference to extra tokens from malformed tool calls, narrated plans, repeated tests, and failed attempts, which can outweigh the per-token saving. We suggest that developers track tokens per completed task over repeated attempts at each precision, and that benchmark designers report energy per completed task beside energy per token. For anyone who hosts an agent, the energy bill arrives per completed task, not per token.
References
[1] Bartowski. 2025. Llamacpp imatrix Quantizations of Devstral-Small-2-24B-Instruct-2512 by mistralai. Hugging Face model repository bartowski/mistralai_Devstral-Small-2-24B-Instruct-2512-GGUF, revision 027695770ae1. Retrieved October 1, 2026 from https://huggingface.co/bartowski/mistralai_Devstral-Small-2-24B-Instruct-2512-GGUF
[2] Bartowski. 2025. Llamacpp imatrix Quantizations of Qwen3-30B-A3B-Instruct-2507 by Qwen. Hugging Face model repository bartowski/Qwen_Qwen3-30B-A3B-Instruct-2507-GGUF, revision 6c6e8692f43e. Retrieved October 1, 2026 from https://huggingface.co/bartowski/Qwen_Qwen3-30B-A3B-Instruct-2507-GGUF
[3] Afsara Benazir and Felix Xiaozhu Lin. 2025. Benchmarking and Characterization of Large Language Model Inference on Apple Silicon. Proceedings of the ACM on Measurement and Analysis of Computing Systems 9, 3, Article 48 (Dec. 2025), 26 pages. Preprint under a different title, “Profiling Large Language Model Inference on Apple Silicon: A Quantization Perspective”: arXiv:2508.08531v1. doi:10.1145/3771563
[4] BIRD authors. 2023. BIRD official evaluation script (bird/llm/src/evaluation.py). AlibabaResearch/DAMO-ConvAI GitHub repository, file revision dec31ae335d7 (June 14, 2023). Retrieved October 1, 2026 from https://github.com/AlibabaResearch/DAMO-ConvAI/blob/main/bird/llm/src/evaluation.py
[5] Jae-Won Chung, Jeff J. Ma, Ruofan Wu, Jiachen Liu, Oh Jun Kweon, Yuxuan Xia, Zhiyu Wu, and Mosharaf Chowdhury. 2026. The ML.ENERGY Benchmark: Toward Automated Inference Energy Measurement and Optimization. In The
Preprint
Thirty-ninth Annual Conference on Neural Information Processing Systems Datasets and Benchmarks Track. Spotlight. Preprint: arXiv:2505.06371v2. https://openreview.net/forum?id=CXqq2v6qUv
[6] Jae-Won Chung, Ruofan Wu, Jeff J. Ma, and Mosharaf Chowdhury. 2026. Where Do the Joules Go? Diagnosing Inference Energy Consumption. Accompanies the ML.ENERGY Leaderboard v3.0. arXiv:2601.22076v2 [cs.LG] https://arxiv.org/abs/2601.22076v2
[7] Julien Delavande, Regis Pierrard, and Sasha Luccioni. 2026. Understanding Efficiency: Quantization, Batching, and Serving Strategies in LLM Energy Use. arXiv:2601.22362v1 [cs.LG] https://arxiv.org/abs/2601.22362v1
[8] Peijie Dong, Zhenheng Tang, Xiang Liu, Lujun Li, Xiaowen Chu, and Bo Li. 2025. Can Compressed LLMs Truly Act? An Empirical Evaluation of Agentic Capabilities in LLM Compression. In Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 267). PMLR, 14169–14202. Preprint: arXiv:2505.19433v2. https://proceedings.mlr.press/v267/dong25k.html
[9] Bradley Efron and R.J. Tibshirani. 1994. An Introduction to the Bootstrap. Chapman and Hall/CRC. doi:10.1201/9780429246593
[10] Mehmet Hamza Erol, Batu El, Mirac Suzgun, Mert Yuksekgonul, and James Zou. 2026. Cost-of-Pass: An Economic Framework for Evaluating Language Models. In The Fourteenth International Conference on Learning Representations. Preprint (April 2025): arXiv:2504.13359v2. https://openreview.net/forum?id=vC9S20zsgN
[11] R. A. Fisher. 1935. The Logic of Inductive Inference. Journal of the Royal Statistical Society 98, 1 (1935), 39–82. doi:10.2307/2342435
[12] Yuxuan Gao, Megan Wang, and Yi Ling Yu. 2026. Token Arena: A Continuous Benchmark Unifying Energy and Cognition in AI Inference. arXiv:2605.00300v1 [cs.AI] https://arxiv.org/abs/2605.00300v1
[13] Georgi Gerganov and llama.cpp contributors. 2023. llama.cpp: LLM inference in C/C++. GitHub repository, created March 10, 2023; master branch at commit a868c3e3c566 inspected. Retrieved October 1, 2026 from https://github.com/ggml-org/llama.cpp
[14] ggml contributors. 2026. GGUF file format specification. ggml GitHub repository, docs/gguf.md, file revision 6af560d55df0 (July 9, 2026). Retrieved October 1, 2026 from https://github.com/ggml-org/ggml/blob/master/docs/gguf.md
[15] Alessandro Giagnorio, Antonio Mastropaolo, Saima Afrin, Massimiliano Di Penta, and Gabriele Bavota. 2026. Evaluating the Impact of Post-Training Quantization on Large Language Models for Code Generation. In Proceedings of the 2026 34th IEEE/ACM International Conference on Program Comprehension (ICPC '26). ACM, 195–206. Preprint, first posted as “Quantizing Large Language Models for Code Generation: A Differentiated Replication”: arXiv:2503.07103v2. doi:10.1145/3794763.3794810
[16] Phillip I. Good. 2005. Permutation, Parametric, and Bootstrap Tests of Hypotheses (third ed.). Springer, New York. doi:10.1007/b138696
[17] Aric A. Hagberg, Daniel A. Schult, and Pieter J. Swart. 2008. Exploring Network Structure, Dynamics, and Function using NetworkX. In Proceedings of the 7th Python in Science Conference. 11–15. doi:10.25080/TCWV9851
[18] Erik Johannes Husom, Arda Goknil, Merve Astekin, Lwin Khin Shar, Andre Käsen, Sagar Sen, Benedikt Andreas Mithassel, and Ahmet Soylu. 2025. Sustainable LLM Inference for Edge AI: Evaluating Quantized LLMs for Energy Efficiency, Output Accuracy, and Inference Latency. ACM Transactions on Internet of Things 6, 4, Article 28 (Nov. 2025), 35 pages. Preprint: arXiv:2504.03360v1. doi:10.1145/3767742
[19] Erik Johannes Husom, Arda Goknil, Lwin Khin Shar, and Sagar Sen. 2026. The Price of Prompting: Profiling Energy Use in Large Language Models Inference. arXiv:2407.16893v2 [cs.CY] https://arxiv.org/abs/2407.16893v2
[20] Md. Monzurul Amin Ifath and Israat Haque. 2026. Characterizing Performance–Energy Trade-offs of Large Language Models in Multi-Request Workflows. Proceedings of the ACM on Measurement and Analysis of Computing Systems 10, 1, Article 7 (March 2026), 26 pages. Preprint: arXiv:2604.09611v1. doi:10.1145/3788089
[21] Jiwon Jang, Kisu Yang, Heuiseok Lim, and Hyunwoo Park. 2026. Flat Score, Amplified Failures: How the Error Budget Masks Damage in Quantized LLM Agents. arXiv:2607.27275v1 [cs.LG] https://arxiv.org/abs/2607.27275v1
[22] Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R Narasimhan. 2024. SWE-bench: Can Language Models Resolve Real-world GitHub Issues?. In The Twelfth International Conference on Learning Representations. Preprint: arXiv:2310.06770v3. https://openreview.net/forum?id=VTF8yNQM66
[23] Renren Jin, Jiangcun Du, Wuwei Huang, Wei Liu, Jian Luan, Bin Wang, and Deyi Xiong. 2024. A Comprehensive Evaluation of Quantization Strategies for Large Language Models. In Findings of the Association for Computational Linguistics: ACL 2024. Association for Computational Linguistics, 12186–12215. Preprint: arXiv:2402.16775v2. doi:10.18653/v1/2024.findings-acl.726
[24] Kawrakow. 2023. k-quants. llama.cpp pull request #1684 by GitHub user ikawrakow, merged June 5, 2023. Retrieved October 1, 2026 from https://github.com/ggml-org/llama.cpp/pull/1684
[25] Kate Keahey, Jason Anderson, Zhuo Zhen, Pierre Riteau, Paul Ruth, Dan Stanzione, Mert Cevik, Jacob Colleran, Haryadi S. Gunawi, Cody Hammock, Joe Mambretti, Alexander Barnes, François Halbach, Alex Rocha, and Joe Stubbs.
Preprint
- Lessons Learned from the Chameleon Testbed. In 2020 USENIX Annual Technical Conference (USENIX ATC 20). USENIX Association, 219–233. https://www.usenix.org/conference/atc20/presentation/keahey
[26] Yuhang Lai, Chengxi Li, Yiming Wang, Tianyi Zhang, Ruiqi Zhong, Luke Zettlemoyer, Wen-Tau Yih, Daniel Fried, Sida Wang, and Tao Yu. 2023. DS-1000: A Natural and Reliable Benchmark for Data Science Code Generation. In Proceedings of the 40th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 202). PMLR, 18319–18345. https://proceedings.mlr.press/v202/lai23b.html
[27] Banseok Lee, Dongkyu Kim, Youngcheon You, and Youngmin Kim. 2025. LittleBit: Ultra Low-Bit Quantization via Latent Factorization. In Advances in Neural Information Processing Systems (NeurIPS).
[28] Jinyang Li, Binyuan Hui, Ge Qu, Jiaxi Yang, Binhua Li, Bowen Li, Bailin Wang, Bowen Qin, Ruiying Geng, Nan Huo, Xuanhe Zhou, Chenhao Ma, Guoliang Li, Kevin Chang, Fei Huang, Reynold Cheng, and Yongbin Li. 2023. Can LLM Already Serve as A Database Interface? A BIG Bench for Large-Scale Database Grounded Text-to-SQLs. In Advances in Neural Information Processing Systems, Vol. 36. 42330–42357. Datasets and Benchmarks Track. Preprint: arXiv:2305.03111v3. doi:10.52202/075280-1835
[29] Shiyao Li, Xuefei Ning, Luning Wang, Tengxuan Liu, Xiangsheng Shi, Shengen Yan, Guohao Dai, Huazhong Yang, and Yu Wang. 2024. Evaluating Quantized Large Language Models. In Proceedings of the 41st International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 235). PMLR, 28480–28524. Preprint: arXiv:2402.18158v2. https://proceedings.mlr.press/v235/li24bb.html
[30] Jiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. 2023. Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation. In Advances in Neural Information Processing Systems, Vol. 36. 21558–21572. Preprint: arXiv:2305.01210v3. doi:10.52202/075280-0943
[31] Jiawei Liu, Songrun Xie, Junhao Wang, Yuxiang Wei, Yifeng Ding, and Lingming Zhang. 2024. Evaluating Language Models for Efficient Code Generation. In First Conference on Language Modeling. Preprint: arXiv:2408.06450v1. https://openreview.net/forum?id=IBCBMeAhmC
[32] Ruikang Liu, Yuxuan Sun, Manyi Zhang, Haoli Bai, Xianzhi Yu, Tiezheng Yu, Chun Yuan, and Lu Hou. 2025. Quantization Hurts Reasoning? An Empirical Study on Quantized Reasoning Models. In Second Conference on Language Modeling. Preprint: arXiv:2504.04823v2. https://openreview.net/forum?id=BM192Ps5Nv
[33] llama.cpp contributors. 2026. llama.cpp quantize tool documentation. llama.cpp GitHub repository, tools/quantize/README.md, master branch at commit a868c3e3c566. Retrieved October 1, 2026 from https://github.com/ggml-org/llama.cpp/blob/master/tools/quantize/README.md
[34] Qi Luo, Kunlin Li, Ziwen Wang, and Yun Chen. 2026. Where Does the Energy Go? Profiling LLM Agent Inference on Blackwell GPUs. arXiv:2609.29707v1 [cs.DC] https://arxiv.org/abs/2609.29707v1
[35] Quinn McNemar. 1947. Note on the Sampling Error of the Difference Between Correlated Proportions or Percentages. Psychometrika 12, 2 (1947), 153–157. doi:10.1007/BF02295996
[36] Anmol Mekala, Anirudh Atmakuru, Yixiao Song, Marzena Karpinska, and Mohit Iyyer. 2025. Does quantization affect models' performance on long-context tasks?. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, 9422–9470. Preprint: arXiv:2505.20276v3. doi:10.18653/v1/2025.emnlp-main.479
[37] Mistral AI. 2025. Devstral Small 2 24B Instruct 2512 model card. Hugging Face model repository, revision 55c5b41e98c2 (last modified July 15, 2026). Retrieved October 1, 2026 from https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512
[38] Chenxu Niu, Wei Zhang, Jie Li, Yongjian Zhao, Tongyang Wang, Xi Wang, and Yong Chen. 2026. TokenPowerBench: Benchmarking the Power Consumption of LLM Inference. Proceedings of the AAAI Conference on Artificial Intelligence 40, 38 (March 2026), 32582–32590. AAAI-26. Preprint: arXiv:2512.03024v1. doi:10.1609/aaai.v40i38.40535
[39] NVIDIA Corporation. 2026. NVML API Reference Guide: Device Queries. Online documentation, release 615, last updated September 9, 2026. Retrieved October 1, 2026 from https://docs.nvidia.com/deploy/nvml-api/latest/api/group_nvmlDeviceQueries.html
[40] Addy Osmani. 2026. What a Task Costs on Opus 5.5. Claude Developer Blog, Anthropic. Published September 25, 2026. Accessed October 2, 2026. https://claude.dev/blog/what-a-task-costs-on-opus-5-5/
[41] Deepak Panigrahy and Aakash Tyagi. 2026. Energy per Successful Goal: Goal-Level Energy Accounting for Agentic AI Systems. arXiv:2605.22883v1 [cs.AI] https://arxiv.org/abs/2605.22883v1
[42] Dzung Pham, Kleomenis Katevas, Ali Shahin Shamsabadi, and Hamed Haddadi. 2026. AgentStop: Terminating Local AI Agents Early to Save Energy in Consumer Devices. In Proceedings of the ACM Conference on AI and Agentic Systems (CAIS '26). ACM, San Jose, CA, USA, 1051–1069. Preprint: arXiv:2605.15206v1. doi:10.1145/3786335.3813163
[43] Qwen Team. 2025. Qwen3-30B-A3B-Instruct-2507 model card. Hugging Face model repository, revision 0d7cf23991f4 (last modified September 17, 2025). Retrieved October 1, 2026 from https://huggingface.co/Qwen/Qwen3-30B-A3B-Instruct-2507
Preprint
[44] Saurabhsingh Rajput and Tushar Sharma. 2024. Benchmarking Emerging Deep Learning Quantization Methods for Energy Efficiency. In 2024 IEEE 21st International Conference on Software Architecture Companion (ICSA-C). IEEE, 238–242. doi:10.1109/ICSA-C63560.2024.00049
[45] Jon Saad-Falcon, Avanika Narayan, Hakki Orhun Akengin, J. Wes Griffin, Herumb Shandilya, Adrian Gamarra Lafuente, Medhya Goel, Rebecca Joseph, Shlok Natarajan, Etash Kumar Guha, Shang Zhu, Ben Athiwaratkun, John Hennessy, Azalia Mirhoseini, and Christopher Ré. 2026. Intelligence per Watt: Measuring Intelligence Efficiency of Local AI. arXiv:2511.07885v6 [cs.DC] https://arxiv.org/abs/2511.07885v6
[46] Mickaël Salaün. 2026. Landlock: unprivileged access control. The Linux Kernel documentation (version 7.3.0-rc5), userspace API, dated August 2026. Retrieved October 1, 2026 from https://docs.kernel.org/userspace-api/landlock.html
[47] Siddharth Samsi, Dan Zhao, Joseph McDonald, Baolin Li, Adam Michaleas, Michael Jones, William Bergeron, Jeremy Kepner, Devesh Tiwari, and Vijay Gadepally. 2023. From Words to Watts: Benchmarking the Energy Costs of Large Language Model Inference. In 2023 IEEE High Performance Extreme Computing Conference (HPEC). IEEE, Boston, MA, USA, 1–9. Preprint: arXiv:2310.03003v1. doi:10.1109/HPEC58863.2023.10363447
[48] Robert Schöne, Thomas Ilsche, Mario Bielert, Markus Velten, Markus Schmidl, and Daniel Hackenberg. 2021. Energy Efficiency Aspects of the AMD Zen 2 Architecture. In 2021 IEEE International Conference on Cluster Computing (CLUSTER). IEEE, Portland, OR, USA, 562–571. Preprint: arXiv:2108.00808v1. doi:10.1109/Cluster48925.2021.00087
[49] Tianyao Shi and Yi Ding. 2025. Systematic Characterization of LLM Quantization: A Performance, Energy, and Quality Perspective. arXiv:2508.16712v1 [cs.PF] https://arxiv.org/abs/2508.16712v1
[50] SWE-agent contributors. 2025. mini-SWE-agent. GitHub repository, created June 28, 2025; main branch at commit 04d809ceab9d (September 3, 2026) inspected. Retrieved October 1, 2026 from https://github.com/SWE-agent/mini-swe-agent
[51] The Linux Kernel Developers. 2026. Power Capping Framework. The Linux Kernel documentation (version 7.3.0-rc5). Retrieved October 1, 2026 from https://docs.kernel.org/power/powercap/powercap.html
[52] Abraham Wald. 1944. On Cumulative Sums of Random Variables. The Annals of Mathematical Statistics 15, 3 (1944), 283–296. doi:10.1214/aoms/1177731235
[53] Xiaokai Wei, Sujan Kumar Gonugondla, Shiqi Wang, Wasi Ahmad, Baishakhi Ray, Haifeng Qian, Xiaopeng Li, Varun Kumar, Zijian Wang, Yuchen Tian, Qing Sun, Ben Athiwaratkun, Mingyue Shang, Murali Krishna Ramanathan, Parminder Bhatia, and Bing Xiang. 2023. Towards Greener Yet Powerful Code Generation via Quantization: An Empirical Study. In Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE '23). ACM, 224–236. Preprint under the title "Greener yet Powerful: Taming Large Code Generation Models with Quantization": arXiv:2303.05378v1. doi:10.1145/3611643.3616302
[54] Patrick Wilhelm, Thorsten Wittkopp, and Odej Kao. 2025. Beyond Test-Time Compute Strategies: Advocating Energy-per-Token in LLM Inference. In Proceedings of the 5th Workshop on Machine Learning and Systems (EuroMLSys '25). ACM, 208–215. Preprint: arXiv:2603.20224v1. doi:10.1145/3721146.3721953
[55] Grant Wilkins, Srinivasan Keshav, and Richard Mortier. 2024. Offline Energy-Optimal LLM Serving: Workload-Based Energy Models for LLM Inference on Heterogeneous Systems. ACM SIGEnergy Energy Informatics Review 4, 5 (Dec. 2024), 113–119. HotCarbon '24. Preprint: arXiv:2407.04014v1. doi:10.1145/3727200.3727217
[56] An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, Chujie Zheng, Dayiheng Liu, Fan Zhou, Fei Huang, Feng Hu, Hao Ge, Haoran Wei, Huan Lin, Jialong Tang, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jing Zhou, Jingren Zhou, Junyang Lin, Kai Dang, Keqin Bao, Kexin Yang, Le Yu, Lianghao Deng, Mei Li, Mingfeng Xue, Mingze Li, Pei Zhang, Peng Wang, Qin Zhu, Rui Men, Ruize Gao, Shixuan Liu, Shuang Luo, Tianhao Li, Tianyi Tang, Wenbiao Yin, Xingzhang Ren, Xinyu Wang, Xinyu Zhang, Xuancheng Ren, Yang Fan, Yang Su, Yichang Zhang, Yinger Zhang, Yu Wan, Yuqiong Liu, Zekun Wang, Zeyu Cui, Zhenru Zhang, Zhipeng Zhou, and Zihan Qiu. 2025. Qwen3 Technical Report. arXiv:2505.09388v1 [cs.CL] https://arxiv.org/abs/2505.09388v1
[57] John Yang, Carlos E Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik R Narasimhan, and Ofir Press. 2024. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering. In The Thirty-eighth Annual Conference on Neural Information Processing Systems. https://arxiv.org/abs/2405.15793
[58] Zeyu Yang, Karel Adamek, and Wesley Armour. 2024. Accurate and Convenient Energy Measurements for GPUs: A Detailed Study of NVIDIA GPU's Built-In Power Sensor. In SC24: International Conference for High Performance Computing, Networking, Storage and Analysis. IEEE, Atlanta, GA, USA, 1–17. Preprint under the title "Part-time Power Measurements: nvidia-smi's Lack of Attention": arXiv:2312.02741v3. doi:10.1109/SC41406.2024.00028
Preprint
Appendix
A Verifier isolation and adversarial checks
Expected answers, reference queries, and private seeds stay outside the agent workspace (Section 4.2), and the verifier draws further inputs from the same private seeds for every precision. The repository verifier compares library outputs with independent implementations on 32 random graphs. Submitted functions and repository-verifier code run in sandboxed child processes (Landlock [46]) that deny file creation, process creation, and TCP connections. Data-processing functions run under a syntactic allow-list, and SQL tools deny writes and access to catalogs, pragmas, and attached databases. The checks of Table 7 test each kind of interface the agent is given.
Table 7. Every adversarial check had to pass before the experiment that uses the verifier.
| Failure mode tested | Attempted by the check | Required outcome |
|---|---|---|
| Reading hidden material | Answer-file reads, directory traversal, parent-environment reads, symlinks | Denied, planted marker unseen |
| Escaping the sandbox | File writes, process creation, TCP connections, disallowed imports | Denied, planted marker unseen |
| Claiming success | Forged success messages, premature successful exits | Rejected by the verifier |
| Answering without solving | Constant answers, hard-coded visible answers, lookups of previously exposed hidden inputs | Rejected by the verifier |
| Weak repository verifier | Original library and the library with its injected defect | Accepts the original, rejects the defect |
| Weak reference | Reference solutions, wrong queries, unmodified stubs | Accepts references, rejects the rest |
B How attempts ended under each budget
Limits end attempts mainly in repository repair (Section 4.3, Table 8). Each model call may generate at most the smaller of the per-turn limit and the unused part of the total, and an attempt ends with a context stop, without sending a request, when its prompt plus this allowance would exceed the context. The deadline counts from the start of the attempt, so it includes 8 to 12 s of model loading with the primary budget and 8 to 17 s with the expanded budget, at most of either deadline. Every valid sampled attempt in the main experiment ended before the 600 s deadline, and the expanded deadline of 1,800 s ended one valid sampled attempt, a 4-bit repository attempt in Qwen expanded after 97 turns.
C Energy-record checks, model loading, and verification energy
Every stored energy value is recomputed from its raw counter readings (Section 4.4). A decrease of a CPU package counter [51] counts as a wrap (i.e., an overflow back to zero) only when it falls from the top quarter of its range of about 65.5 kJ to the bottom quarter, and any other decrease invalidates the attempt. The recomputed energy of each period must match the stored value to a relative tolerance of .
A 4-bit load takes 0.4 to 0.7 kJ less than an 8-bit one, with median loading energy per sampled attempt of 1.55 to 2.14 kJ for 4-bit and 2.00 to 2.87 kJ for 8-bit across the conditions. Because loading costs about as much as a short attempt (0.07 to 1.88 times the median operational energy of an attempt for 4-bit and 0.05 to 2.40 times for 8-bit), Section 5.1 charges one load to every attempt as a worst case, and supported disagreements remain for both models. The research verifier stays
Preprint
Table 8. Outside repository repair, nearly all sampled attempts submit. Entries are percent of valid attempts, 4-bit / 8-bit. With the expanded budget, all attempts on the other families submitted in Qwen expanded and Devstral. All attempts stayed within the tool-call limit, and one reached the total output-token limit.
| Condition | Tasks | Submitted | Context limit | Turn limit | Per-turn token limit |
|---|---|---|---|---|---|
| Main experiment | Other families | 97 / 98 | 0 / 0 | 2 / 2 | 0 / 1 |
| Repository | 34 / 34 | 40 / 38 | 25 / 28 | 1 / 0 | |
| Qwen expanded | Repository | 52 / 35 | 22 / 31 | 19 / 33 | 6 / 0 |
| Repository rerun | Repository | 54 / 33 | 27 / 33 | 16 / 31 | 3 / 3 |
| Devstral | Repository | 87 / 86 | 6 / 6 | 1 / 0 | 7 / 9 |
| Held-out | BIRD | 92 / 92 | 1 / 0 | 6 / 8 | 0 / 0 |
| EvalPerf | 100 / 99 | 0 / 0 | 0 / 0 | 0 / 1 |
outside the agent's energy (Section 4.4), and its median energy is at most 0.13 kJ, rising to 10.0 kJ for 4-bit attempts in the repository rerun, where submitted patches run the test suite.
D Sensitivity analyses and energy drift
Table 9 confirms the results of Section 5 under other handling of remote logins, missing energy records, partial repetitions, pairing, and answer matching.
Missing energy records. All three incomplete energy records support the same conclusions once rebuilt (Section 4.4). Table 9 rebuilds the two that the deadline cut off during generation from the readings taken before it, and bounds the 8-bit record lost after a verified completion by the task's range.
Partial repetitions. Two conditions have a partial repetition (Section 4.6), the eighth in Qwen expanded and a held-out repetition on machine A. Held-out repetitions were assigned to machines before any ran, and the analysis uses machine C, where both sampled repetitions finished.
Drift. Any drift in energy per token across repetitions affects both precisions alike (Section 4.3). For attempts of the same task and precision with identical per-call token counts in every sampled repetition (105, 68, and 182 attempts on machines A, D, and B), energy per output token changed by , , and per repetition. The 4-bit and 8-bit slopes differed by less than per repetition on every machine, with intervals within on machines A and B and within on machine D. Machine D swings by about between repetitions, but both precisions run in the same repetition, so the swings cancel in the ratio.
E Held-out task selection and statistical procedures
Both held-out subsets were fixed by rules independent of how any model performed (Section 4.5).
Function-implementation problems. Of the 112 EvalPerf [31] problems outside the main set, 37 were eligible and all 37 were used (58 lacked the runtime separation, 15 had an incorrect reference solution, and two lacked computable canonical outputs). A problem is eligible if its canonical, fastest, and slowest reference solutions are correct and the slowest takes at least three times the time limit (the greater of 2 s and three times the canonical solution's median runtime), so that a correct but slow solution fails. Every failure had a cause other than the time limit or the regression tolerance, so both thresholds leave the reported comparisons unchanged.
Preprint
Table 9. The reported conclusions hold under each alternative analysis. Ratios are 4-bit/8-bit energy per completed task with 95% bootstrap intervals, and disagreement counts use comparable tasks.
| Condition and main analysis | Alternative result | Conclusion |
|---|---|---|
| Repository rerun, attempts overlapping brief remote logins kept | Without them 45 of 85 against 23 of 83 completions (), 0.61 [0.27, 1.11] | Holds |
| Repository rerun, 4-bit deadline failure without energy | Rebuilt energy moves one task to 8-bit, 3 of 4 disagreements, against 2 of 4 in the main analysis, 0.88 [0.39, 1.63] | Holds |
| Devstral, 8-bit deadline failure without energy | Rebuilt energy 0.86 [0.79, 1.02], 8 of 26 disagreements | Holds |
| Main experiment, 8-bit record lost after a verified completion | Energy bounded by the task’s range gives 1.165 to 1.173, 10 of 23 disagreements | Holds |
| Qwen expanded, eighth repetition, run on another machine, excluded | With it, per token 0.93 [0.89, 0.96], per task 1.03 [0.78, 1.29], 12 of 23 disagreements, 4 supported, 16-bit/8-bit per task 1.13 [0.88, 1.36] | Holds, 4 supported |
| EvalPerf (C), partial repetition on A excluded | With it, 0.88 [0.79, 1.01], 82 of 92 against 84 of 91 completions | Same direction, as in Section 5.4 |
| BIRD (C), partial repetition on A excluded | With it, 0.96 [0.79, 1.15] | Holds |
| Held-out (A), partial repetition alone (17 EvalPerf, 40 BIRD tasks) | EvalPerf 0.85 [0.71, 0.98], BIRD 0.95 [0.84, 1.05] | Holds |
| Three 29-task conditions, unpaired attempts | Only repetitions valid at both precisions, 1.16 [0.89, 1.28], 0.92 [0.74, 1.21], 0.92 [0.83, 1.06], 10 of 23, 10 of 21, 8 of 26 disagreements | Holds |
| BIRD (C), answers compared as sets [4] | As multisets or ordered lists, both 44 of 80 against 52 of 80 completions, 0.96 [0.82, 1.15] | Holds |
BIRD questions. A seeded shuffle (seed 20260929) of the 925 BIRD [28] questions labeled simple in the June 2024 development release chose the first 40 with at most five per database, giving 11 databases.
Intervals. Condition and family summaries (Section 4.6) resample attempts within tasks (2,000 draws [9]), and held-out summaries resample tasks and then attempts (5,000 draws), grouped by database for BIRD. Unpaired draws resample each precision’s valid attempts, paired draws resample whole repetitions so both precisions stay together, and draws without a completion are omitted.
Noise baseline. The baseline (Section 4.6) counts the disagreements expected by luck alone [16]. The full shuffle swaps the two precision labels with probability 1/2 in each repetition valid at both precisions. The second shuffle divides each 4-bit attempt’s model-call energy by the task’s per-token ratio, swaps the labels, and multiplies the attempts now labeled 4-bit by that ratio, so only the per-token gap depends on precision. Supported counts use 300 shuffles with 1,000 bootstrap draws each, and disagreement counts use 10,000 shuffles. The second shuffle yields 8.6, 8.2, and 4.8 disagreements on average, against the 10, 10, and 8 disagreements observed. Both shuffles yield fewer than one supported disagreement on average, and three or more appear in at most 2.7% of full shuffles and 1.7% of second shuffles.
Preprint