Local Dual-GPU Benchmark: Comparing the Coding Ability of Three Quantized Models
This article presents a local dual-GPU benchmark comparing three quantized "Flash-class" models on agentic coding tasks. It explains why local coding agent evaluation requires metrics beyond public benchmark scores, details the task set, tools, and machine-based scoring, and summarizes three distinct working patterns. Readers will find a computable model for estimating latency and cost, plus selection guidance for different scenarios.
一、Why Local Coding Agent Evaluation Needs a Rethink
In the past, a coding model was usually judged by its score on public benchmarks. But once a model is placed inside a real agent loop, the situation is completely different: it has to decide on its own which file to read, when to run tests, and how to fall back after a failure. The object of evaluation shifts from “a single question-answer exchange” to “an observable execution trace.”
Local deployment changes the constraints even further. Cloud evaluations often care only about quality and latency, whereas in a local environment, VRAM capacity, quantization format, batching strategy, and prompt cache reuse all directly alter the cost structure. The same model under different quantization schemes can show completely opposite economics.
As a result, a useful local coding evaluation should record at least four kinds of metrics at the same time: task pass rate, wall-clock time, number of interaction turns, and total output tokens, plus an additional statistic for prompt cache hit rate. Missing any one of them can lead to a misread conclusion.
二、Benchmark Design: Tasks, Tools, and Scoring
The benchmark referenced here uses a dual accelerator card setup as the local inference base and selects three small-to-medium “Flash-class” models with different quantization schemes for a side-by-side comparison. Their quantization routes belong respectively to 4-bit low-bit quantization, low-precision floating point (8-bit level), and a 4-bit floating-point mixed format. This difference is the root of all the performance divergence that follows.
The task set consists of two parts:
- Defect fixing: functional defects in 17 real projects, requiring the model to locate the cause and make minimal changes;
- Application building: building a complete web application from scratch, with 19 acceptance checks covering interface correctness, data validation, error handling, and basic security practices.
The tool layer provides 21 native tools, covering file read/write, directory traversal, dependency installation, test execution, log reading, and more. The models must select and chain these tools autonomously as agents, rather than outputting all the code at once.
Scoring is done entirely by machine, with no large model introduced as a judge. This is critical: using a model to score introduces position bias and verbosity bias, whereas a judgment based on whether test cases pass and whether checks are hit is reproducible.
三、Results: Three Distinct Working Modes
All three models passed every test, but their process profiles differ greatly.
The first is the “minimal output” type. It produced only about twenty thousand tokens throughout, took about 18.4 minutes to build the application, and was the fastest of the three. Notably, the per-token speed of its underlying inference engine is not superior; the advantage comes entirely from extremely low output volume—say less, and naturally finish earlier. This kind of model tends to give the minimal viable change directly, with almost no written reasoning.
The second is the “plan-first” type. It became the one with the fewest turns at 77 interactions, habitually outputting a plan first and then landing it step by step, with good process readability. At the same time, its prompt cache hit rate is as high as about 98%, meaning most of the input does not need to be recomputed, giving it the lowest compute cost per task. This mode is especially suited to unattended long-running background tasks.
The third is the “deep thinking” type. It performs a large amount of internal reasoning every turn, takes the longest total time at about 27.6 minutes, but produces the most standardized code structure and additionally generates 18 test cases, with the best engineering quality metrics. The extra time is actually converted into less rework.
An easily overlooked inference: the number of interaction turns is not proportional to time spent. Fewer turns does not mean faster, and more output does not mean slower. What really determines wall-clock time is the superposition of “total output ÷ effective throughput” and “fixed per-turn overhead × number of turns.”
四、Abstracting the Conclusion into a Computable Selection Rule
A rough mental model can be used to estimate the time of a local agent:
Total time ≈ (output tokens / effective generation speed) + turns × fixed per-turn overhead + queuing and loading overheadEffective generation speed ≈ peak throughput × batching efficiency × bandwidth gain from quantizationCompute cost ≈ input tokens × (1 - prompt cache hit rate) × compute unit price per token
The first term explains why the minimal output type wins; the second explains why the plan-first type can compress total time with fewer turns; the third explains why a high cache hit rate can significantly reduce cost. Plugging these three terms into your own task profile is more useful than memorizing any single leaderboard.
五、Selection Advice for Different Scenarios
- Pursuing the lowest compute cost and needing long-running unattended operation: prioritize low-precision floating point with high prompt cache reuse, combined with a stable task queue and logging service for process traceability.
- High requirements on code standards and test coverage, with delivery time allowed to relax: choose a more thorough reasoning scheme, and keep its generated test assets in the pipeline.
- Needing a runnable prototype as soon as possible: choose the low-bit quantization scheme with minimal output, and leave subsequent refactoring to a stricter review stage.
Engineering-wise, note further: whichever you choose, tool calls should be made into replayable operation logs, artifacts should be stored in object storage, and monitoring alerts should track failure rate and latency drift.
六、Limitations and Reproducibility
This conclusion comes from a single run, a specific tech stack, and a fixed task set, with obvious variance. Readers are advised to repeat at least three times in their own environment, fix the random seed and temperature, record the quantization format, context length, concurrency, and cache strategy, and then compare side by side. If conditions allow, the evaluation pipeline can be containerized and deployed on a container platform or on relevant general capabilities of Baidu AI Cloud to ensure environment consistency and comparable results.
