Best Local LLM for Coding? Real Bugs (2026)

SYS.BLOG

Best Local LLM for Coding? Real Bugs (2026)

I ran Qwen3.8, GLM 5.3 and Claude Sonnet on 16 real bugs from my own repo. A single RTX 5090 matched Sonnet on accuracy and took 10 to 20 times longer.

|Aditya Bawankule
Local LLMAI AgentsBenchmarksClaude CodeHermes AgentQwen

A single RTX 5090 running Qwen3.8 fixed every fair bug I threw at it. Claude Sonnet 5.5 missed one. Sonnet also finished all 16 tasks in 11 minutes, and the 5090 needed two hours.

So will I ever earn back the tens of thousands of dollars I spent on local AI hardware in saved tokens? Obviously not. I still think every serious developer should have a local model, and the reason has nothing to do with speed.

How I tested local coding models

I pulled 16 real bugs from the fix commits of a production Next.js app I run, rolled the repo back to before each fix, and wrote a bug report for each one. The hidden tests from the real fix commit decide pass or fail.

Every local run happened in a macOS sandbox with no network, a fresh clone and a 40-minute cap per task. I stripped every git ref that points at the fix, so the model can't look it up in the history.

Three of my tasks were impossible

Three tasks failed for every model, so I gave them to Sonnet in Claude Code as a sanity check. Sonnet failed all three too.

The tests were the problem, not the models. One wanted the exact error string "Invalid JSON." when the bug report never said what the message should be. Another treated a build name over 120 characters as malformed, and the report never mentions a limit. The third wanted two tracking fields that the real commit added alongside the fix, and Sonnet's fix for that one was actually correct.

If you build a coding benchmark from real commits, run a frontier model on it first. It's the fastest way to find your own broken tasks.

Results: local models are accurate, just slow

Qwen3.8 Flash Next on one RTX 5090 passed all 13 fair tasks in every harness I tried. Sonnet passed 12 and was 10 to 20 times faster per task.

ModelHardwareHarnessFair tasks passedMedian per taskAll 16 tasks
Claude Sonnet 5.5Anthropic cloudClaude Code12/1332s11 min
Qwen3.8 Flash Next (IQ3_XXS)RTX 5090Hermes Agent13/13336s136 min
Qwen3.8 Flash Next (IQ3_XXS)RTX 5090DeepSeek Harness13/13405s123 min
Qwen3.8 Flash Next (IQ3_XXS)RTX 5090Oh My Pi13/13631s248 min
GLM 5.3 Flash (community MLX)Mac StudioOh My Pi12/13428s124 min
GLM 5.3 Flash (official weights)Mac StudioOh My Pi11/13346s152 min

Sonnet's one miss was careless. It edited the guide metadata function instead of the article one right next to it, and it never ran the tests to catch the mistake. The local models run tests constantly, which is part of why they're slow and part of why they caught it.

The harness mattered almost as much as the model. The same Qwen weights on the same GPU took twice as long in Oh My Pi and wrote 8 times the output tokens. Test the harness before you blame the model. Hermes Agent was the fastest of the three on Qwen.

DeepSeek V4.1 Flash didn't make the table. Even with its Engram tables offloaded to the SSD it needs about 215 GB of RAM, and on the Mac it took a median of 7.5 seconds before the first token appeared, and 41 seconds at p90. Its run never finished cleanly.

Why local coding models are so slow

They take far more steps. Sonnet averaged 5 tool calls per task: it opens the right file and writes the fix. Local models spend 15 to 100+ turns searching, re-reading and re-running tests. Per turn they're only about 1.5 to 2 times slower, so a faster GPU won't fix it.

Setup eats time too. My first homemade agent loop threw away the model's reasoning between turns, which tanked every early score. Oh My Pi quietly sent its side tasks to a different model on the 5090. Hermes Agent kept recreating a test profile after I deleted it. None of that happens when you pay for Claude Code.

So why own a local model at all?

Because it's the backup that can't say no. For privacy-critical work, code you can't send to a third party, and security research the frontier models refuse, local is the only option. Codex already refuses a lot of the firearm-related work I do for my other site. Imagine if every frontier lab started doing the same.

I don't ever want to be stuck using only open models. But these results say I could make it work: slower, more babysitting, the same bugs fixed.

There's a bigger point too. Running intelligence on hardware you own is a form of independence. I mean it when I say the Second Amendment should extend to GPUs. If the frontier labs decide something is off-limits, the people with local models still get to decide for themselves.

And honestly, it's a fun hobby. Tuning quants, fighting chat templates and watching a 5090 grind through a bug at 2am is its own kind of satisfying, even if it never pays for itself. The same itch is how Dream Pixel Forge started, as a local Stable Diffusion GUI.

For daily coding I still use the tools in my Claude Code alternatives roundup, and my Claude Code vs Codex vs Cursor comparison covers which one to pick. The local box is the one I'd reach for the day those stop working for me.

FREQUENTLY ASKED QUESTIONS

Is a local LLM good for coding?

Yes for correctness, not for speed. In a test on 13 real bugs, Qwen3.8 Flash Next on one RTX 5090 fixed all 13, against 12 for Claude Sonnet 5.5, but it took 10 to 20 times longer per task.

What is the best self-hosted LLM for coding?

Qwen3.8 Flash Next at the IQ3_XXS quant was the best self-hosted coding model in this test. It passed all 13 fair tasks on a single RTX 5090 in Hermes Agent, DeepSeek Harness and Oh My Pi, and Hermes Agent was the fastest of the three.

Why run a local LLM if cloud models are faster?

Privacy, independence, and work the cloud models refuse. A local model keeps code on your own machine, keeps working if a provider changes its policies, and handles security and other sensitive work that frontier models often decline.