Local LLM Benchmarking on Dual GPUs: Quantization and Agentic Coding in Practice

    This article examines how quantization choices and agent behavior affect local coding agents running on a dual-accelerator setup. Based on a public benchmark in which three quantized models completed bug fixes and a full application build under machine-only scoring, it covers evaluation design, the trade-offs of 4-bit weight, 8-bit floating-point, and block-scaled low-bit floating-point quantization, three common agent behavior patterns, the role of prompt cache hit rate in cost control, and practical model-selection guidance for different scenarios.

    1. Why “It Runs” Is Not the Same as “It Works Well”

    Running mid-sized inference models on a local dual-accelerator machine has become a common way for teams to evaluate agentic coding capability. One public benchmark is representative: a model acted as an agent that called more than twenty native tools, fixed a dozen known defects, and delivered a complete application with nearly twenty acceptance checks. Scoring was fully automated against predefined rules, with no large model acting as a judge. All three models, each using a different quantization scheme, passed every check, yet wall-clock time ranged from eighteen to twenty-eight minutes, with clear differences in interaction turns, output volume, and cache hit rate.

    This exposes a common misconception: treating “did the task pass” as the only metric. For real engineering adoption, the experience is determined by three overlapping curves—output per unit of time, cost per task, and the maintainability of the deliverable. The discussion below covers evaluation design, quantization impact, behavior patterns, metrics, and deployment recommendations.

    2. Evaluation Design: Four Prerequisites for Trustworthy Results

    A ranking produced by a single run is easily distorted by randomness, so the evaluation plan itself has to hold up first.

    1. Task tiering. Split tasks into three tiers—“local defect fix,” “cross-file refactor,” and “build from scratch with self-verification”—corresponding to short context, long context, and strong instruction following.
    2. Machine-decidable checks. Write acceptance points as executable checks, such as static analysis, unit tests, and API contract validation, avoiding subjective scoring.
    3. Separate process metrics from result metrics. Result metrics track pass rate; process metrics track turn count, input/output volume, cache reuse rate, and tool-call success rate.
    4. Fixed environment and budget. Pin driver and runtime versions, sampling parameters such as temperature, context limit, and total budget; otherwise the numbers cannot be compared across runs.

    A schematic evaluation skeleton can be expressed as a configuration-driven file:

    1. task_suite:
    2. bugfix: {count: 17, checks: unit+contract}
    3. build: {count: 1, checks: 19}
    4. agent:
    5. max_turns: 200
    6. tools: native_only
    7. scoring: machine_only
    8. budget:
    9. context_tokens: 131072
    10. wall_clock_limit_min: 45

    3. How Quantization Affects Performance: Three Different Paths

    Quantization is not just about saving VRAM. It changes decoding speed, output style, and even reasoning-chain length, so a simple ranking by precision bit width is misleading.

    • Very low-bit (4-bit level) weight quantization: the smallest memory footprint and bandwidth pressure. Paired with a concise output strategy, it is often the fastest end to end. The trade-off is that stability over long reasoning chains has to be backstopped by stricter acceptance checks.
    • Low-precision floating point (8-bit level): when the hardware supports it, throughput and accuracy are reasonably balanced, and interaction turns are usually the fewest, which suits a steady “plan first, then execute step by step” style.
    • Block-scaled low-bit floating point (4-bit level float): heavy internal deliberation per turn, with more standardized code and broader test coverage, but the longest wall-clock time.

    An easily overlooked implication: a slow decoding engine does not necessarily make the overall run slow. If the model’s output is extremely restrained and the total generated volume is small enough, end-to-end time can still come out ahead. Evaluation should therefore look at “total output volume × per-token cost” rather than per-token speed alone.

    4. Agent Behavior Patterns: Three Typical Styles and Where They Fit

    • Minimal execution: almost no lengthy explanation, just the smallest viable change. Good for quickly obtaining a runnable prototype.
    • Plan-driven: produces a plan and file list first, then implements step by step. Few turns and a clear trajectory, which makes auditing and replay easy.
    • Deep reasoning: extensive internal reasoning each turn, producing standardized code with complete tests. Suitable as a quality baseline or a hardening step before submission.

    In engineering terms, the three can be combined into a pipeline: use the minimal style to produce a skeleton, the plan-driven style to fill in structure, and the deep-reasoning style to add tests and standards checks. This orchestration is more controllable than simply chasing the “strongest model.”

    5. The Cost Perspective: Cache Hit Rate Is an Undervalued Variable

    In multi-turn agent interactions, the prefix (system prompt, tool definitions, conversation history) is highly repetitive. When the prompt cache hit rate approaches saturation, repeated computation is sharply reduced and the cost curve shifts down noticeably. Ways to raise the hit rate include keeping the system prompt and tool description order stable, placing volatile content later, chunking and summarizing long documents, and avoiding pointless reordering of history messages. If you use a cloud model service or inference platform, prioritize general capabilities that support context caching and elastic scaling, and combine them with logging and monitoring alerts for usage attribution.

    6. Actionable Selection Guidance

    • Daily iteration, cost and efficiency first: choose 8-bit floating-point quantization with a visibly plan-driven configuration. Few turns and cache-friendly, suitable for long autonomous runs in the background.
    • High quality requirements and broad test coverage: choose the block-scaled low-bit floating-point configuration, accepting longer runtime in exchange for standardized code and more complete cases.
    • Prototype validation, demos, and time-boxed delivery: choose 4-bit weight quantization with constrained output length to get a runnable version fastest.
    • Unified guardrails: regardless of the choice, fix the acceptance scripts, set a maximum turn count and budget ceiling, and retain the full trajectory for review.

    7. Conclusion and Follow-Up Validation

    Quantization scheme, output strategy, and agent orchestration together determine the real-world performance of a local coding agent; a ranking on any single dimension is not enough to support a selection decision. These conclusions come from a single run on a specific technology stack. Follow-up work should expand the sample, add multilingual and multi-framework tasks, and introduce energy consumption and throughput metrics. For teams that want to stand up an evaluation and inference environment quickly, a reproducible experiment pipeline can be built on general cloud capabilities such as container platforms, object storage, and monitoring alerts, so that every selection decision is backed by data.