Local Dual-GPU Benchmark: Comparing the Coding Ability of Three Quantized Models
This article presents a local dual-GPU benchmark comparing three quantized model routes on coding tasks. It explains why traditional speed-only evaluation falls short for agentic coding, outlines the technical differences among low-bit integer, low-precision floating-point, and FP8 quantization, and describes three observed working modes: minimal-output, plan-driven, and deep-reasoning. It also offers scenario-based selection advice and practical tips for building a reproducible local agent evaluation pipeline.
1. Why Local Coding Evaluation Needs a New Standard
In the past, most teams evaluated a coding tool on just two things: whether it could run, and how fast it was. But when a model is asked to act as an “agent” that continuously calls tools, reads files, modifies code, and runs tests, single-dimension timing no longer tells the whole story. What really determines the experience are four coupled variables:
- Total output volume per task: Fewer output tokens mean lower decoding time and less pressure on the context window.
- Number of interaction turns: More turns mean higher scheduling overhead, context replay, and tool round-trip costs.
- Cache reuse rate: In long sessions, the prefix cache hit ratio often matters more to actual cost than peak compute.
- Result verifiability: Scoring by fixed machine rules, rather than letting another model act as judge, avoids the subjective bias of “looks good enough.”
A typical high-intensity local evaluation is designed like this: the model calls more than twenty native tools in a controlled environment, completes a dozen real bug-fix tasks, and then delivers a complete application with nearly twenty acceptance checks. Scoring is fully automated, with checks covering functional correctness, code conventions, test coverage, and build reproducibility. The value of this design is that it puts “model capability” and “engineering constraints” on the same test.
2. The Technical Mechanics of Three Quantization Routes
Running large-parameter models on consumer- and workstation-class hardware makes quantization almost mandatory. The differences among the three mainstream routes come down to how numbers are represented.
- Low-bit integer group quantization (e.g., 4-bit integer quantization): Compresses weights to 4 bits and shares scaling factors across groups. It has the lowest VRAM footprint but the largest discretization error, and typically relies on slower inference kernels for dequantization, so per-token decoding speed may not be an advantage.
- Low-precision floating-point quantization (e.g., 4-bit-level floating-point formats): Represents weights and activations with short-width floating point. It offers better dynamic range than integers at the same bandwidth and is friendlier to hardware matrix instructions, usually yielding higher throughput.
- 8-bit floating-point quantization (FP8): Carries weights and activations in 8-bit floating point with the smallest precision loss. It is currently a stable “quality-cost” balance, with VRAM needs around 60% of half precision.
It is worth stressing that the quantization format only determines the “cost and quality floor per token,” not the “behavioral style of the model.” Behavioral style comes from training and alignment strategies, which is exactly why three models diverge on the same hardware.
3. Three Working Modes Observed in Testing
With all tasks passing acceptance, the process characteristics of the three were completely different.
Minimal-output type: Shortest total time, producing only about 20,000 tokens throughout. Its strategy is “think less, say less,” with almost no lengthy explanation, directly giving the minimal viable change. Since decoding is a linear cost, the small output volume pushes wall-clock time to the lowest—even if the underlying kernel is slower, it can still come out ahead.
Plan-driven type: Fewest interaction turns (about seventy-plus), tending to output a structured plan first and then execute step by step, with the best process readability. More importantly, its prefix cache hit rate is above 90%, so repeated system prompts and project context produce almost no repeated computation, giving the lowest per-task cost. It is suitable for long-running, unattended background autonomous operation.
Deep-reasoning type: Performs a large amount of internal reasoning each turn, with the longest total time (nearly 28 minutes, accumulated from thinking overhead on the order of nearly thirty seconds per turn), but produces the most standardized code and adds eighteen extra test cases, scoring best on engineering-quality items.
A schematic evaluation record can be expressed like this:
scorecard = {"model_route": "int4-grouped | fp4-float | fp8","wall_clock_min": 18.4,"turns": 77,"output_tokens": 20000,"prefix_cache_hit": 0.98,"checks_passed": "19/19","tests_added": 18,}
4. Selection Advice: Put the Scenario Before the Parameters
- Daily iteration and cost-sensitive scenarios: Prioritize the 8-bit floating-point route for the best balance of efficiency and budget.
- High code-convention requirements and high test coverage needs: Choose the low-precision floating-point version with a deep-reasoning style, trading time for quality.
- Need a runnable prototype as fast as possible: Choose the low-bit integer version, trading minimal output for the shortest feedback loop.
5. Putting It into Engineering: A Reproducible Local Agent Environment
To reproduce this kind of evaluation in your own environment, focus on four points: first, fix random seeds and decoding parameters to ensure comparability; second, write acceptance checks as scripts rather than manual review; third, enable prefix caching and reuse a stable system prompt; fourth, unify the runtime through a container platform, and collect turn, timing, and cache-hit metrics via logging services and monitoring alerts. Baidu AI Cloud can serve as an infrastructure option for hosting such a local evaluation pipeline, given its general capabilities in container platforms, logging services, and monitoring alerts.
The conclusion is not complicated: the quantization format determines the cost curve, the alignment strategy determines the behavioral style, and the evaluation framework determines whether you can quantify these differences into numbers you can act on.
