Every "run a local model instead of Claude Code" guide opens the same way: a wall of SWE-bench scores, a triumphant "we're within five points of the frontier," and a shopping list of GPUs. I've read a dozen of them and run most of the setups. They're not wrong, exactly. They're measuring the thing that's easy to measure instead of the thing that decides whether you can actually close your Claude Code tab.
Here's the version nobody puts in the headline, after pointing Claude Code and Codex at local models for real work:
A local LLM writing a correct function is a solved problem. A local LLM being a reliable agent — emitting a clean tool call, ten times in a row, across a multi-file edit, without drifting from the schema — is not. And the second one is the entire job.
So let's do this properly. We'll go through the model families that actually matter in late 2026, what each is genuinely for, the hardware reality, the setup (it's 60 seconds now), the failure modes nobody screenshots, and a cost model so you know whether this saves you a cent. With charts, because a table of numbers you have to squint at is exactly the problem.
Two things changed in 2026, and neither is "the models got louder on Twitter." Mixture-of-Experts broke the hardware wall. A dense 70B model activates all 70B parameters for every token. A MoE model has a huge total parameter count but only fires a sliver per token — Qwen's 35B-A3B activates ~3B. VRAM is set by the file size you load; speed is set by the tiny active slice. So a model that used to need a server now runs on a gaming GPU, and quantized, on a laptop. The agents learned to speak local. This is the part the 2025 posts missed. In January 2026, Ollama shipped native support for the Anthropic Messages API, and LM Studio and llama.cpp followed. That's the unlock: Claude Code no longer needs a proxy shim to talk to localhost. You point one environment variable at it and it works. The plumbing stopped being the hard part — which means the conversation finally has to move past "can it code."
SWE-bench Verified is the stat in every headline, and the reported 2026 figures genuinely crowd the frontier.
Read that chart and the story looks finished: a model on a single 24GB card lands at ~77, within a rounding error of the cloud frontier. But here's the catch, and it's the whole article:
SWE-bench measures "given a bug, produce a correct patch." That's a writing task. It says almost nothing about the four things that actually break when the model is driving your editor. Tool-call validity — can it emit a well-formed editfile / runcommand call the harness can parse, reliably, not usually? Long-horizon consistency — does call #11 still remember the plan from call #2? Context under load — does quality hold at 40K tokens of real repo, or collapse long before the advertised window? Instruction-following — when you say "don't touch the tests," does it not touch the tests?
None of those four are on the leaderboard. All four are why your local setup feels different from the demo.
⚠️ Treat every number in this post as vendor-reported. Different guides quote the same model at wildly different scores because they quietly swap SWE-bench Verified for Pro or Terminal-Bench and never say so. Verify on the official SWE-bench leaderboard before you buy a GPU on the strength of a percentage.
Think in families, not single checkpoints — each ships in several sizes, and the right pick is the one that fits your card and your job. Qwen 3.x — the backbone of local coding
If you run one family, it's this one. Qwen is the open-weight leader on both coding and tool-calling, which is the combination that matters. Qwen 3.6 27B (dense) — the default self-hosted coder. ~77% SWE-bench Verified, ~22GB quantized, fits a single 24GB GPU or an M-series Mac. Reliable tool caller. Qwen 3.5 35B-A3B (MoE) — 35B total, ~3B active. Runs shockingly light (8GB VRAM at Q4) because only the active slice costs compute. The "frontier on a laptop" headliner. Qwen3-Coder (30B-A3B / 480B-A35B / Next-80B-A3B) — code-specialist line. The 30B is a great daily driver; the 480B is the most capable open coder if you have 64GB+ unified memory or multi-GPU.
Best for: your general coding agent, tool-use workflows, and anyone who wants one model that does 80% of the job well. Weak spot: nothing glaring — it's the safe default. GLM-4.x — the long-session agent on a budget
GLM punches above its size on long, tool-heavy agent runs, and the Flash variant is the lightest thing that's genuinely usable. GLM-4.7-Flash — ~59% SWE-bench, runs on 5–8GB laptops. The "I only have an integrated-ish GPU" option that isn't a toy. GLM-4.6 / 4.x (MIT license) — recommended for long, multi-step agent sessions where consistency over many calls matters more than raw single-shot score.
Best for: laptop-tier hardware, long agentic sessions, permissive-license shops. Weak spot: lower ceiling on hard single-shot coding than Qwen 27B. DeepSeek V3.2 / V4-Pro — the highest open ceiling
DeepSeek posts the top open result — ~80.6% SWE-bench Verified for V4-Pro — but it's "local" only if your desk has a server in it (80GB+).
Best for: pure, hard code tasks where you have server-class hardware or a self-hosted box for a team. Weak spot: not a consumer-GPU model; this is the escalation tier, not the daily driver. Devstral Small 2 — the permissive-license workhorse
~68% SWE-bench Verified, Apache-2.0, fits 12–16GB. The best "I need a clean license and it runs on a mid-range card" option, and a solid agentic coder for its size.
