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

    This article reports a local dual-GPU benchmark comparing three lightweight open-source models using different quantization schemes on real coding tasks: agentic bug fixing across 17 projects and building a web app from scratch with 19 acceptance checks, all scored by deterministic scripts. It explains how quantization shapes observable "working style" (output volume, turn count, cache hit ratio, latency, artifact quality), provides a reusable metrics-collection skeleton, and offers a scenario-based selection framework instead of a single leaderboard winner.

    1. Why Re-run a Coding Benchmark on a Local Dual-GPU Setup

    As agents take over codebase understanding, defect localization, and patch generation, “can the model write code” is no longer a sufficient question. What actually determines the real-world experience comes down to three things: the time cost per task, the actual compute and cache overhead, and the maintainability of the generated code. The value of a local dual-accelerator setup is that it makes all three observable on the same machine with the same toolchain, avoiding the noise introduced by cross-environment comparisons.

    One typical independent evaluation picked three lightweight open-source models using different quantization schemes. The task set had two parts: first, having the models operate in agent form, calling more than twenty native tools to fix defects in seventeen real projects; second, building a complete web application from scratch that had to pass nineteen acceptance checks. Scoring was fully automated by machine according to predefined rules, with no large model acting as a judge, which structurally eliminates the “model prefers model” bias.

    It is worth stressing that conclusions like these have clear boundaries: a single run, a specific tech stack, a specific tool set. They work as a first-pass filter for model selection, not as a final verdict.

    2. How Quantization Indirectly Determines “Working Style”

    Quantization is not just a matter of trading VRAM for compute; it stacks with the model’s own training preferences and shapes observable behavioral differences. The three schemes in this test showed patterns that can be abstracted into the following comparison:

    Dimension Very-low-bit integer quantization Low-precision floating-point quantization Higher-precision floating-point quantization
    Output volume Very small (about 20K tokens to complete the app build) Medium Relatively large
    Interaction turns Medium Fewest (about 77 turns) More
    Per-turn internal reasoning Shallow Shallow to medium Deep
    Cache hit ratio Average Very high (over about 90%) Average
    End-to-end time Shortest (about 18 minutes) In the middle Longest (about 28 minutes)
    Engineering artifacts Usable prototype Clear structure, lowest cost Most standardized code, most test cases

    Three takeaways are worth remembering:

    First, end-to-end time is not determined by the inference engine’s throughput alone. The very-low-bit scheme has slower underlying decoding, but its total output is compressed to a minimum, so the total time is actually the shortest. In agent scenarios, “saying less” is itself a form of performance optimization.

    Second, interaction turns and cache hit ratio together determine compute cost. Models that tend to plan first and then execute step by step use fewer turns with high prefix repetition, so prompt caching hits almost every time and the number of tokens actually involved in computation drops sharply. This makes them well suited to unattended, long-running background tasks.

    Third, deep reasoning buys engineering quality. The model that does extensive internal deliberation every turn is the slowest, but it produces the most tests and the most standardized code, with a lower rework rate.

    3. A Reusable Evaluation Design: Turning Subjective Impressions into Metrics

    To make this kind of comparison repeatable, the evaluation script needs to measure “process” and “result” separately. The sample code below shows a minimal skeleton for metric collection:

    1. # Illustrative structure for evaluation metric collection only; no specific product APIs involved
    2. metrics = {
    3. "wall_clock_sec": 0, # End-to-end time
    4. "turns": 0, # Interaction turns
    5. "prompt_tokens": 0, # Input-side tokens
    6. "output_tokens": 0, # Output-side tokens
    7. "cache_hit_ratio": 0.0, # Prompt cache hit ratio
    8. "checks_passed": 0, # Automated acceptance checks passed
    9. "tests_added": 0, # Number of new test cases added
    10. "tool_calls": 0, # Number of native tool calls
    11. }
    12. def run_task(agent, task):
    13. state = agent.reset(task)
    14. while not state.done:
    15. state = agent.step(state) # The model decides to call a tool or produce a patch
    16. metrics["turns"] += 1
    17. metrics["prompt_tokens"] += state.usage.input
    18. metrics["output_tokens"] += state.usage.output
    19. metrics["cache_hit_ratio"] = state.usage.cache_ratio
    20. metrics["tool_calls"] += len(state.tool_calls)
    21. metrics["checks_passed"] = task.verify(state.repo)
    22. metrics["tests_added"] = count_new_tests(state.repo)
    23. return dict(metrics)

    There are four design points: acceptance must be done by deterministic scripts, such as compilation, static checks, unit tests, and end-to-end assertions; each task fixes the random seed and dependency versions to avoid environment drift; both process metrics and result metrics are recorded, so that “fast but wrong” is not mistaken for excellent; and the same model is run multiple times at minimum, drawing conclusions from the median rather than a single value.

    4. The Cost Perspective: Why Cache Hit Ratio Matters More Than Unit Price

    In a local environment, cost shows up as time and power consumption; in the cloud, it shows up as billing volume. But the optimization direction is the same for both: reduce the amount of input that actually participates in computation. A long-session agent has to carry the system prompt, tool definitions, and historical context every turn. If the prefix is stable and the cache is reusable, both repeated billing and repeated computation are greatly reduced. In practice there are three approaches:

    • Stable prefix: put tool descriptions and specification notes at the very front and avoid frequent changes;
    • Segmented summarization: compress the conversation history into a structured summary to keep context from growing linearly;
    • Plan first: produce a task plan first, then execute step by step, which naturally increases prefix repetition.

    5. A Selection Framework: Choose by Scenario, Not by Benchmark Score

    • If you need a runnable prototype as fast as possible to validate interaction and page structure: choose the very-low-bit scheme with concise output and the shortest time;
    • For everyday business development, long-running background tasks, and cost sensitivity: choose the low-precision floating-point scheme with few interaction turns and high cache reuse;
    • If code standards are demanding, high test coverage is needed, and a longer wait is acceptable: choose the higher-precision scheme with deeper reasoning and more complete artifacts.

    A more robust engineering practice is to combine them: use the low-cost scheme for exploration and drafts, use the high-quality scheme for review and additional tests, and use a deterministic validation pipeline as the gate in between.

    6. Conclusion and Suggestions for Follow-up Validation

    Quantization schemes do not change a model’s capability ceiling, but they significantly change its behavioral rhythm and the shape of its artifacts, and therefore the end-to-end cost. The value of an evaluation lies not in crowning a single winner, but in establishing a transferable set of judgment criteria: use automated acceptance as the baseline, use process metrics to explain differences, and use scenario constraints to make the final trade-off. Follow-up work should expand the task types, increase the number of repetitions, cover different tech stacks and context lengths, and observe cache behavior and error accumulation in long sessions, so that the conclusions carry genuine engineering reference value.