Local Quantized Models for Coding Agents: A Benchmark Comparison

    This article compares how three local quantization approaches (4-bit integer, 8-bit floating point, and 4-bit floating point) behave when running "Flash"-tier models as coding agents. Based on a reproducible benchmark of 17 real bug-fix tasks plus a from-scratch web app with 19 checkpoints, it breaks down the differences in output economy, interaction strategy, and quality completeness, and offers practical guidance for choosing and tuning a local quantized coding setup.

    1. Why Local Quantized Models Deserve a Fresh Look at Coding

    Over the past two years, the main bottleneck for running large models locally has been GPU memory capacity and bandwidth. With low-bit quantization, mixed-precision floating point, and KV cache reuse now mature, a single machine or dual-GPU setup can host models capable of tool calling. Local agentic coding has moved from “it runs” to “it’s actually usable.”

    But “finishing a task” and “being suitable for daily team use” are two different things. Coding agent tasks have long chains, many states, and a high cost of failure. A run that looks successful may still leave obvious debt in code style, test coverage, and cost structure. That calls for an evaluation method that does not rely on subjective scoring, so the differences between quantization schemes and model behavior patterns can be quantified.

    The hardware for this test was a dual-GPU environment built from two desktop-class AI accelerators. Model size was held constant at the “Flash” tier (the lightweight version aimed at low latency and high throughput), so the differences came down to quantization and numerical precision schemes.

    2. Test Design: Taking “Subjective Feel” Out of the Loop

    The credibility of a benchmark depends on whether scoring can be reproduced by a machine. The design points here were:

    • Task set: 17 bug-fix tasks from real open-source projects, plus one web app built from scratch, the latter with 19 feature and quality checkpoints.
    • Tool environment: the model ran as an agent with access to 21 types of native tools, covering common development actions such as file read/write, command execution, dependency management, test running, and log retrieval.
    • Scoring: everything was decided automatically by scripts and checkers, with no LLM used as a judge, avoiding the systematic bias of “models preferring models.”
    • Recorded metrics: end-to-end wall time, number of interaction turns, input and output tokens, prompt cache hit rate, number of test cases, and checkpoint pass rate.

    A schematic skeleton of the harness can be abstracted as:

    1. def run_case(model, case, tools, checker):
    2. session = AgentSession(model=model, tools=tools)
    3. for step in range(MAX_STEPS):
    4. action = session.step(case.prompt)
    5. if action.type == "finish":
    6. break
    7. report = checker.run(case) # Pure rule/test-driven scoring
    8. return {
    9. "wall_time": session.elapsed,
    10. "turns": session.turns,
    11. "in_tokens": session.in_tokens,
    12. "out_tokens": session.out_tokens,
    13. "cache_hit": session.cache_hit_rate,
    14. "passed": report.passed_ratio,
    15. }

    3. Three Quantization Routes, Three Working Modes

    All three models passed the tests, but their process characteristics were completely different, which shows that the quantization scheme shapes a model’s behavioral tendencies.

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

    The 4-bit integer quantization scheme was the fastest in the app-building stage, at about 18.4 minutes, with only about 20,000 output tokens for the whole run. Its underlying inference engine throughput was not the strongest, but its output was extremely restrained: no lengthy explanations, no unnecessary comments, with nearly every step going straight to file changes.

    The tradeoff is weak process observability: it is hard for a human developer to tell from intermediate output whether it is going off track, and success or failure only becomes clear when the checker returns a result. This kind of scheme suits “results-oriented” scenarios such as prototype validation, batch script refactoring, and one-off migrations.

    3.2 Low-Precision Floating Point Quantization: Plan-Driven with High Cache Reuse

    The 8-bit floating point quantization scheme had the fewest interaction turns, only 77, and its behavior was to produce a plan first and then execute step by step, giving the best process readability. Its prompt cache hit rate reached 98%, meaning that context repeatedly passed in during long tasks (project structure, style guidelines, historical diffs) was almost never recomputed, giving the lowest compute cost per task.

    This mode is naturally suited to long autonomous background runs: overnight batch fixes, automated remediation in continuous integration, and regression fixes after dependency upgrades.

    3.3 4-Bit Floating Point Quantization: Deep Reasoning for Engineering Quality

    The 4-bit floating point quantization scheme did a large amount of internal reasoning every turn and took the longest, about 27.6 minutes, but it produced the most standardized code and generated 18 additional test cases, giving the best engineering-quality metrics.

    Its cost structure is also worth noting: the long reasoning chains pushed up output tokens and wall time together, and without cache reuse, the marginal cost of long sessions would accumulate quickly. It suits modules with high maintainability requirements, core libraries, and commits that need review.

    4. Abstracting the Differences into Three Transferable Dimensions

    Setting aside the specific models, the findings reduce to three orthogonal dimensions along which any local quantized coding scheme can be positioned:

    Dimension Observed Metrics Engineering Implication
    Output economy Total output tokens, wall time per task Determines throughput and response speed
    Interaction strategy Number of turns, plan-before-execute behavior Determines observability and controllability
    Quality completeness Number of tests, checkpoint pass rate, style compliance Determines rework rate and maintenance cost

    The three squeeze against each other: compressing output to the extreme sacrifices process transparency; deep reasoning stretches tail latency; high cache reuse can lower both cost and turns, but depends on a stable way of organizing context.

    5. Actionable Selection and Tuning Advice

    • Want a usable prototype as fast as possible: pick the low-bit integer quantization scheme and move the checker to the front, replacing manual review with automated tests.
    • Need unattended long-running background tasks: pick the low-precision floating point scheme and focus on optimizing context organization, turning project conventions, directory layout, and historical changes into a stable prefix to maximize cache hits.
    • Delivering code that needs long-term maintenance: pick the 4-bit floating point scheme, and set an output budget and a maximum turn limit to keep reasoning chains from running out of control.
    • General tuning: give the agent a tool allowlist and least privilege; hand large-file retrieval to log and search services rather than stuffing it into context; use a containerized environment so every run can be rolled back; and write wall time, turns, cache hit rate, and pass rate into a unified monitoring and alerting system to form a sustainable evaluation baseline.

    When reproducing a similar environment in the cloud, general-purpose capabilities are usually enough: a container platform to host isolated build environments, object storage to keep evaluation artifacts and datasets, log and monitoring/alerting services to aggregate metrics, and a message queue to distribute batch tasks.

    6. Conclusion and Limitations

    The coding ability of local quantized models has crossed the usability threshold. The real difference is not “whether it can get it right,” but at what cost it gets it right. Low-bit integer quantization wins on speed, low-precision floating point wins on cost and controllability, and 4-bit floating point wins on engineering quality.

    It is worth stressing that these conclusions come from a single run, a single tech stack, and a specific task set, with a limited sample size. Changes in quantization schemes and inference engine versions could both shift the ranking. Teams are advised to build a small regression evaluation set on their own codebases, continuously track wall time, turns, cache hit rate, and pass rate as fixed metrics, and form their own selection conclusions on that basis.