Local Dual-GPU Benchmark: Comparing the Coding Performance of Three Flash Models
This article reports a local dual-GPU benchmark comparing three lightweight (Flash-class) coding models under different quantization schemes. An independent developer ran all three on the same hardware across agentic tool calling, bug fixing, and end-to-end app construction, using fully automated scoring based on test pass rates and checklist completion. All three models passed, but their cost structures differed sharply: one minimized output tokens, one minimized interaction turns with roughly 98% prompt cache hit rate, and one produced the most standardized code with the most test cases. The article explains these working modes, how quantization couples with hardware, a reusable evaluation methodology, and model selection recommendations.
1. Background: Why Benchmark Coding Models on a Local Dual-GPU Setup
As lightweight (Flash-class) coding models continue to emerge, running agentic coding assistants on a local workstation or small server has become a common practice. A dual-accelerator configuration offers relatively ample VRAM capacity and parallel capability, allowing medium-sized models with low-bit quantization to handle longer contexts and multiple rounds of tool calls.
A common challenge is that the behavioral differences between quantization schemes (such as 4-bit integer quantization, low-precision floating-point quantization, and 8-bit floating-point quantization) on the same hardware often determine the real-world experience more than the model’s “leaderboard score.” The reason is that the time cost of agentic coding tasks is not determined solely by single-token inference speed, but jointly by “total output volume × number of interaction turns × cache reuse rate.” This benchmark is built around this composite cost model.
2. Evaluation Design: Tasks, Tools, and Scoring
The evaluation was conducted by an independent overseas developer, selecting three lightweight coding models with different quantization schemes and running them on the same dual-GPU hardware platform. The tasks consisted of three parts:
- Agentic tool calling: the model had to call 21 native tools in an agentic manner (file read/write, command execution, retrieval, test running, etc.);
- Bug fixing: fixing defects in 17 real-world projects;
- End-to-end build: building a complete web application with 19 checklist items.
The key design is the scoring method: scoring was fully automated by machine throughout, with no large model used as a judge. This significantly improves the credibility of the conclusions, because “model judging model” tends to introduce preference bias and position bias, whereas automated scoring based on test case pass rates and checklist completion is reproducible and auditable.
3. Results Overview: All Three Models Passed, but Their Working Modes Differed
All three models passed all tests, and the differences were reflected in “cost structure” rather than “capability presence or absence.”
| Dimension | Low-bit integer quantization | 8-bit floating-point quantization | Low-precision floating-point quantization |
|---|---|---|---|
| App build time | ~18.4 minutes (shortest) | In the middle | ~27.6 minutes (longest) |
| Interaction turns | More | ~77 turns (fewest) | More |
| Output volume | ~20K tokens (smallest) | Medium | Largest |
| Cache hit rate | Average | ~98% (highest) | Average |
| Code and tests | Usable prototype | Clear plan, controllable process | Most standardized code, most test cases (18) |
4. Technical Interpretation of Three Typical Working Modes
4.1 Minimal-Output Type: Trading “Writing Less” for “Delivering Faster”
The low-bit integer quantization version’s inference engine did not have an advantage in single-token speed, but the model tended to produce very little output, only about 20K tokens throughout, so it was actually the fastest in end-to-end construction. This highlights a frequently overlooked rule: in agentic tasks, output length is the main amplifying factor of time consumption. Lengthy explanations, repeated code pasting, and excessive comments all linearly amplify the total duration.
4.2 Plan-Driven Type: Trading “Fewer Turns” for “Lower Cost”
The 8-bit floating-point version had the fewest interaction turns, with the behavioral trait of first making a plan and then executing it step by step, with a transparent and traceable process. More importantly, its prompt cache hit rate was as high as about 98%, meaning that repeated system prompts, tool definitions, and historical fragments in long contexts could be reused, pushing computation costs to the minimum. This mode is well suited for unattended autonomous operation scenarios, such as nighttime batch fixing and pipeline integration.
Schematic pseudocode can summarize its execution skeleton:
plan = decompose(task) # Decompose into ordered subtasks at oncefor step in plan:ctx = reuse_cached_prefix() # Reuse the stable prefix to reduce repeated computationresult = call_tools(step, ctx)verify(result) # Verify each step immediately to avoid error accumulation
4.3 Deep-Thinking Type: Trading “More Reasoning Turns” for “Engineering Quality”
The low-precision floating-point version performed a large amount of internal reasoning in each interaction turn, taking the longest time, but producing the most standardized code and the most test cases. Its cost was token consumption and latency, and its benefit was less rework and higher maintainability. For codebases that require long-term maintenance and multi-person collaboration, this “slow but steady” mode often has a lower total cost.
5. The Coupling Between Quantization Schemes and Hardware
Quantization is not simply “compressing size”; it simultaneously changes three things: VRAM usage and the context length that can be supported, single-token inference throughput, and the indirect impact of numerical stability on code generation accuracy. Low-bit integer quantization usually saves the most VRAM and is suitable for long contexts, but for certain numerically sensitive operators it relies more on mature inference engine implementations; low-precision floating-point and 8-bit floating-point offer more balanced throughput and stability when hardware native support is good. In engineering, it is recommended to actually measure three metrics on the target hardware—“throughput + first-token latency + long-context degradation”—rather than just looking at model size.
6. A Reusable Evaluation Methodology
To reproduce a similar benchmark in your own environment, it is recommended to fix the following variables and automate everything:
- Fix the hardware and runtime versions, and record the driver and inference engine versions;
- The task set includes three categories—tool calling, bug fixing, and end-to-end build—covering different failure modes;
- Scoring is entirely based on test pass rates and checklist completion, avoiding subjective judges;
- Record four core metrics: total time, interaction turns, output tokens, and cache hit rate;
- Repeat three times and take the median to exclude occasional jitter.
7. Selection Recommendations
- Daily development collaboration: prioritize the plan-driven 8-bit floating-point scheme with high cache reuse rate, which offers the best balance of efficiency and cost;
- High-standard delivery and strong test coverage: choose the deep-thinking low-precision floating-point scheme to reduce rework;
- Rapid prototype validation: choose the minimal-output low-bit integer scheme to get a runnable result fastest.
In related practices at Baidu AI Cloud, developers can combine the above evaluation process with general cloud product capabilities such as container platforms, object storage, log services, and monitoring alerts, turning model operation, task scheduling, and metric collection into a reproducible engineering evaluation pipeline, so that selection decisions shift from “subjective experience” to “data-driven.”
