Choosing Quantized Code LLMs by File Size and Energy per Solved Task
Aditi Patodiya
Independent Researcher
Published November 13, 2026 · on the feed November 19, 2026 · ▲ 3 · arXiv 2611.17605
The abstract
A developer running a code assistant on a laptop downloads one model file, and local inference moves the energy of every request onto that machine. A common rule says a larger model at lower precision tends to beat a smaller one at higher precision. We ran 24 GGUF files of Qwen2.5-Coder at four sizes on a fanless MacBook Air M2 and priced each in energy per solved task on 542 EvalPlus tasks. The result is a selection guide indexed by Ollama's listed file size, with an evidence label on each pick. At 1 and 2 GB it picks the q4_K_M files of the 1.5B and 3B models, both on the correctness and energy frontier under every accounting. At 3 GB as listed, the larger-model rule picks 7B-q2_K, the only measured 7B file that fits, and there it does not pay. That file brings no significant gain in solves over the 2 GB pick, 3B-q4_K_M, and the 90% CI limits any 3B-q4_K_M deficit to 2.4 points. Yet 7B-q2_K needs 2.03 times the energy per solved task on CPU, GPU and memory rails, or 1.66 to 1.81 times on whole-system power. On HumanEval+, five alternating session pairs give a ratio of 1.925 against 1.956 in the main grid. At 8 GB, 7B-q6_K buys a significant gain over the 2 GB pick at a higher energy price. From 1.5B up, q4_K_M trails the highest precision measured at its size by less than 3 points (90% CI). We release per-task results, power logs and the analysis script.
The Brief
3:11A short podcast summary of the paper. Written and voiced by AI.
Transcript
Choosing Quantized Code LLMs by File Size and Energy per Solved Task. By Aditi Patodiya, working independently. Published on the thirteenth of November.
Picture a developer running a code assistant on a laptop. They download one model file, and because inference is local, the energy of every request now lands on that machine. A common rule of thumb says that a larger model at lower precision tends to beat a smaller model at higher precision. This study tests that rule where it actually bites, and finds that at one critical file size it does not pay. The larger, more aggressively quantized model brings no significant gain in solved tasks, and costs roughly twice the energy for each task it solves.
The setup is concrete. Twenty-four GGUF files of Qwen2.5-Coder, at four model sizes, run on a fanless MacBook Air M2. Each file is priced in energy per solved task, across five hundred and forty-two EvalPlus tasks. The output is a selection guide indexed by the file size that Ollama lists, with an evidence label attached to each pick.
At one and two gigabytes, the guide picks the q4_K_M files of the 1.5B and 3B models. Both sit on the frontier of correctness and energy under every accounting the study uses.
At three gigabytes as listed, the larger-model rule would pick 7B-q2_K, the only measured 7B file that fits. Here the rule fails. Compared with the two gigabyte pick, 3B-q4_K_M, that file brings no significant gain in solves, and the ninety percent confidence interval limits any deficit of 3B-q4_K_M to two point four points.
The energy side is not close. Measured on the CPU, GPU and memory rails, 7B-q2_K needs two point zero three times the energy per solved task. On whole-system power the ratio is one point six six to one point eight one times. A check on HumanEval+, using five alternating session pairs, gives a ratio of one point nine two five, against one point nine five six in the main grid.
The claim is bounded in several ways. It concerns one model family, Qwen2.5-Coder, on one machine, a fanless MacBook Air M2, measured on EvalPlus tasks. The negative result is specific to the three gigabyte tier, where the only larger option is a heavily quantized 7B file. Higher up, the picture changes: at eight gigabytes, 7B-q6_K does buy a significant gain over the two gigabyte pick, though at a higher energy price. So the rule is not wrong everywhere; it fails where the larger model has to be squeezed hardest to fit.
One further pattern holds across sizes. From 1.5B upward, q4_K_M trails the highest precision measured at its size by less than three points, again at ninety percent confidence. The per-task results and the power logs are released alongside the guide, so each pick can be checked against the data behind it.
The useful move here is the unit of comparison. Indexing by the file size a developer actually sees, and pricing by energy per solved task rather than by accuracy alone, turns a vague rule of thumb into a set of specific choices, each with its evidence attached. Under that accounting, the larger model at lower precision is sometimes the right buy and sometimes simply the more expensive one, and the guide says which is which.
The deep dive
6:12A longer episode, written from the whole paper. Written and voiced by AI.
Transcript
Choosing Quantized Code LLMs by File Size and Energy per Solved Task. By Aditi Patodiya, working independently. Published on the thirteenth of November. This is the long version: the whole paper rather than the abstract.
A developer who runs a code assistant on a laptop downloads one model file. That file fixes a model size and a quantization recipe, and because inference is local, it also fixes how much energy every request draws from that machine. A common rule guides the choice: a larger model at lower precision tends to beat a smaller one at higher precision. Song and colleagues put a threshold on that rule, near three and a half effective bits per weight, for general models. The question here is where the rule stops paying for code, once you count the energy it takes to get working code out.
Two ideas carry the study. The first is that a tag is not a bit count. Ollama ships each model size under several recipe tags, built on llama.cpp's k-quants, which mix tensor types inside one file. So the digits in a tag can mislead. The smallest model's three-bit file holds no three-bit tensors at all, and stores five point six six effective bits per weight. The seven B two-bit file stores three point one six, below Song's threshold. Effective bits come from the runtime's load log, not the name.
The second idea is the price. Energy per token rewards a file that talks cheaply even when its code fails. The paper instead divides energy by tasks solved, since a developer pays for working code.
The grid is twenty-four shipped files of Qwen2.5-Coder-Instruct, at four sizes, called point five B, one point five B, three B and seven B, run through Ollama on a fanless MacBook Air M2 with sixteen gigabytes of memory. Every size runs five recipes from three-bit to eight-bit. The three smaller sizes also run sixteen-bit floats, and only seven B adds a two-bit file, to trace the low end. Each file answers the same five hundred and forty-two EvalPlus tasks, from HumanEval+ and MBPP+, with greedy decoding and one sample each. A task counts as solved only if it passes both the base and the plus tests.
Energy comes from the macmon tool, reading the CPU, GPU and memory rails once a second. Power above an idle baseline is summed over each task's window, and pooled energy is divided by pooled solves. A whole-system view, under three choices of idle baseline, is reported beside it as a range.
The statistics are paired, task by task. Exact McNemar tests count the tasks one file solves and the other does not, with Holm correction, and for picks chosen after seeing the data, correction runs over all two hundred and seventy-six pairs of files. Equivalence uses a three point margin, also chosen after the data. A file sits on the frontier if no other file both solves more and costs less per solve.
One more rule guards the energy claims. Under greedy decoding, every repeat reproduced its outputs byte for byte, yet speed moved: one rerun decoded twenty-three point six percent faster with identical answers. So an energy gap is headlined only if it clears forty percent, or if a dedicated repeat covers it. That repeat alternates the two files behind the key decision, five pairs in one night, each block preceded by a cooldown.
Within a size, the four-bit medium recipe holds. From one point five B up, it trails the highest precision measured by less than three points. At the smallest size, that is not shown.
The guide picks the four-bit file of the one point five B model at a one gigabyte budget, and the four-bit file of the three B model at two. Both stay on the frontier under every accounting, and the step between them buys nine point two points for one point seven six times the energy.
The comparison that tests the thesis is the next gigabyte. At three gigabytes, the larger-model rule picks the seven B two-bit file, the only seven billion file that fits. It solves three hundred and sixty-three tasks. The three B four-bit file solves three hundred and sixty-six. Forty-eight tasks are solved only by the smaller file, forty-five only by the larger. The interval limits any deficit of the smaller file to two point four points. Yet the larger file needs two point zero three times the energy per solved task. In the alternating repeat, it cost more in all five pairs, with a ratio of one point nine two five.
The paper also says why. The smaller file decoded about twice as fast, and the larger one took about twice the wall time at similar rail power. The cheaper file was also the quicker one.
The paper has a threats to validity section, and it is candid. Energy is Apple's estimate, read with no external meter, and the rails cover only twenty-eight to fifty-three percent of system power, so only ratios on one machine are compared. The main grid ran once per file per benchmark, in a fixed order, so size lines up with time of day, and other applications were open. Only the key pair is repeated, on one benchmark, in one night, under heavy thermal pressure throughout. Both the three point margin and the forty percent rule were set after seeing the data.
Scope is narrow too: one code family, one runtime, one machine, Python tasks, one prompt, greedy decoding, and twenty-four of the sixty recipes the registry lists. Each pick is the best of the files measured, not of all files.
The idea to carry away is that the file you download is an energy decision made once. A tag tells you neither the bits a file stores nor whether it works: one listed three-bit file solves seven tasks in five hundred and forty-two. Price files per solved task, read effective bits rather than tags, and smoke-test what you pull. Here, the registry's default tags for the one point five B and three B models were the frontier picks.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free