Local Dual-GPU Benchmark: Comparing the Coding Ability of Three Quantized Models

    This article reports a local dual-GPU benchmark comparing three quantized models on agentic coding tasks, covering tool-calling breadth, real bug fixes, and a full application build with automated acceptance checks. It explains the evaluation design, the measured behavior of low-bit, low-precision floating-point, and mixed-precision quantization, and three transferable conclusions about output style, prompt cache hit rate, and test artifacts, plus practical selection guidance and limitations.

    1. Why Local Dual-GPU Is a Practical Starting Point for Agentic Coding

    A single GPU has limited VRAM, while the context for agentic coding tasks is typically stacked from a system prompt, tool definitions, multi-turn history, and repository snippets. That combination easily hits the VRAM ceiling. Running inference across two accelerators in parallel is therefore a pragmatic compromise: it allows medium-sized models to be loaded and served locally, while avoiding the compliance pressure of uploading source code to an external environment. For teams working with internal codebases, proprietary frameworks, or regulated data, this “data never leaves the internal network” property often matters more than raw throughput numbers.

    One caveat should be stated up front: compute and bandwidth in a local environment are fixed, so benchmark conclusions are inherently environment-dependent. Every observation below should therefore be read as a relative relationship under specific hardware and a specific task set, not as a universal ranking.

    2. Evaluation Design: Making the Conclusions Defensible

    The value of a model comparison lies not in how much you run, but in whether the design is reproducible. The setup used here can be abstracted into four elements:

    1. Tool-calling breadth: The model must act as an agent and call more than twenty native tools (reading and writing files, executing commands, retrieving symbols, running tests, and so on). This tests the accuracy of tool selection and the correctness of argument construction, not the fluency of a single-turn answer.
    2. Task realism: The set includes a dozen real bug fixes plus a complete application build with nearly twenty acceptance checks covering functional correctness, edge-case handling, and engineering conventions.
    3. Scoring objectivity: Everything is judged automatically by scripts. Each check is a binary pass or fail, and no large model is used as a judge, which avoids the systematic bias that comes from favoring a similar writing style.
    4. Variable control: The three comparison targets use different quantization schemes while everything else (prompts, tool set, acceptance scripts, hardware topology) is held constant.

    A schematic skeleton of the evaluation is shown below; the key point is treating “machine-decidable” as a hard constraint:

    1. def run_case(model, case, tools, max_turns=200):
    2. ctx = build_context(case, tools) # system prompt + tool schema + repo snapshot
    3. for turn in range(max_turns):
    4. out = model.generate(ctx)
    5. if out.tool_calls:
    6. ctx += apply_tools(out.tool_calls, tools) # real execution, produces side effects
    7. if checks_pass(case, workspace): # machine verdict, no model judge
    8. return Report(turn, elapsed, tokens, checks_passed=True)
    9. return Report(turn, elapsed, tokens, checks_passed=False)

    3. Measured Behavior of the Three Quantization Schemes

    All three models completed every acceptance check, but the paths they took to get there differed enormously, and that is the most informative part.

    3.1 Low-Bit Quantization: Minimal Output in Exchange for End-to-End Speed

    The scheme using 4-bit-class low-bit quantization had the shortest total time, finishing the application build in just over eighteen minutes. The reason is not mysterious: it produced only about twenty thousand tokens in total, in a “think it through first, then write a small amount of code” style. Even though the underlying inference engine did not have an advantage in single-token speed, the large reduction in total output still won it the end-to-end race.

    This points to a frequently overlooked fact: end-to-end latency ≈ output tokens ÷ generation speed + tool execution and scheduling overhead. In tool-call-heavy scenarios, cutting ineffective output and avoiding long explanatory restatements is more effective than chasing peak generation speed.

    3.2 Low-Precision Floating Point: Fewest Turns and Highest Cache Reuse

    The scheme using 8-bit-class floating-point quantization had the fewest interaction turns (about seventy-seven), with a style of presenting a plan first and then landing it step by step, which is easy to follow. More importantly, its prompt cache hit rate reached ninety-eight percent, meaning the repeated system prompt and tool definitions almost never needed to be recomputed, pushing the compute cost per task to its lowest.

    For long-running unattended background tasks, this combination is highly attractive: fewer turns mean lower risk of state drift, and a high cache hit rate means a flatter cost curve.

    3.3 Mixed-Precision Floating Point: Deep Reasoning Yields the Best Engineering Quality

    The scheme using a low-precision mixed floating-point format performed extensive internal reasoning every turn and took the longest overall (about twenty-seven minutes), but produced the most conformant code and came with eighteen test cases, making it the best of the three in engineering quality. It traded time for a lower probability of rework, and on codebases that need long-term maintenance, that trade is usually worthwhile.

    4. Attributing the Differences: Three Transferable Conclusions

    • Quantization scheme influences “language tendency”: Low-bit quantization tends to compress expression, low-precision floating point tends to advance in a structured way, and mixed precision tends toward explicit deep thinking. When selecting a scheme, treat it as a style parameter rather than purely a precision parameter.
    • Cache hit rate is an underrated cost lever: Moving the hit rate from a single-digit percentage to above ninety percent often affects total cost more than switching hardware does. In engineering terms, keep the prompt prefix stable and the order of tool definitions fixed.
    • Test artifacts should count as deliverables: The number and quality of test cases directly determine the cost of later iterations. If an evaluation only looks at “did it pass,” it will systematically undervalue the worth of high-conformance models.

    5. Selection Guidance and a Practical Checklist

    • Daily iteration, balancing efficiency and cost: prioritize the low-precision floating-point scheme, paired with a stable prompt prefix to raise cache reuse.
    • High delivery quality requirements, needing high-coverage tests: prioritize the mixed-precision scheme and treat the extra time as a quality investment.
    • Needing a runnable prototype quickly: prioritize the low-bit quantization scheme, then refactor and add tests later.

    When putting this into practice, four things are worth completing: fix the random seed and prompt templates; put the acceptance scripts under version control; record per-turn token counts and cache hit metrics; and repeat the same task at least three times, taking the median. If you carry this on general-purpose cloud capabilities, you can combine a container platform for environment isolation, object storage for saving artifacts, and logging and monitoring services for tracking metrics, forming a reproducible evaluation pipeline in an environment such as Baidu AI Cloud.

    6. Limitations and Follow-Up Validation

    The conclusions above come from a single run, a single technology stack, and a fixed tool set, and the sample size is not enough to support statistical significance. Follow-up work should broaden the task types (cross-language migration, legacy system modernization), increase the number of repetitions, and run cross-combination validation of the quantization schemes. Until then, the safer approach is to treat these findings as directional guidance rather than the sole basis for procurement or standardization.