Choosing Quantized Code LLMs by File Size and Energy per Solved Task
Aditi Patodiya
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 q4KM 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-q2K, 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-q4KM, and the 90% CI limits any 3B-q4KM deficit to 2.4 points. Yet 7B-q2K 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-q6K buys a significant gain over the 2 GB pick at a higher energy price. From 1.5B up, q4KM 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.
Create a lesson
Related papers
Markdown Is Not a Firewall: four coding agents, one rules file, four boundaries
Shared title terminology · Sandeep Dhuri
Think Before You Code: A Benchmark for Testing LLMs on Software Engineering Deliberation
Shared title terminology · Ashman Mehra
More Context, Mixed Results: Evaluating LLMs for Identifier Recovery and Code Deobfuscation
Shared title terminology · Simon Queyrut, Valerio Schiavoni, Giuseppe Antonio Di Luna et al.
Does Confusing Code Confuse LLMs? A Pilot Study on C++
Shared title terminology · Tim van de Wetering, Lola Solovyeva, Fernando Castor
Do They Do as They Are Told? Investigating Coding Agents' Adherence to Explicit Instructions in Context Files
Shared title terminology · Gianmario Voria, Yutaro Kashiwa, Gemma Catolino et al.
AgentScript-Eval: Benchmarking LLMs and Agents for Code Generation in an Enterprise DSL
Shared title terminology · Dipin Khati, Shubham Mehrotra, Bin Bi et al.