Outlier  ›  data

Can a local 27B model code like Claude? The measured answer

Quick answer
  • Partly, and I can tell you exactly where. A local on-device 27B coding agent (the "compact" tier, running in MLX on an M1 Ultra) scored a measured ~45% on SWE-bench Verified — 18 of 40 blind.
  • Local engineering, no new training, gets it to mid-50s / low-60s: execution-oracle selection, self-verification, verbatim memory, whole-file edits, and grammar-constrained tool emission.
  • Training (LoRA + distillation) reaches ~70–80% in-distribution. The last ~15–20 points to Claude's 65–72% is a genuine ceiling, not a tuning knob.
  • It already matches Claude on bounded, testable tasks — and it is truthful: it reports failure honestly instead of claiming a false pass.
  • The single biggest lever is an execution oracle: select on running the tests, not on "it compiles" and not on the model approving its own work.

"Can a small local model really code like Claude?" is the question I get most, and the honest answer is neither the hype ("small models are as good as frontier now") nor the dismissal ("a 4-bit 27B is a toy"). It's a specific, measurable gap that I've reverse-engineered into a roadmap. This is that roadmap: the measured starting point, how far pure local engineering carries it, how far training carries it, and the three walls that a local 27B does not cross — with the numbers behind each claim. No vibes.

The measured starting point: ~45% on SWE-bench Verified

SWE-bench Verified is the benchmark that actually matters for coding agents — real GitHub issues with hidden tests that either pass or don't. Run blind against a slice of it, the local 27B agent resolved 18 of 40 tasks — about 45%. That number is measured, not projected, and it comes with the honesty this whole strategy is built on:

The roadmap: what closes the gap, and what doesn't

Here's the honest ladder, from the measured 45% up to the wall. Each rung is a real, distinct source of gain — and the last rung is a ceiling, not another rung.

StageWhat it addsMeasured / target band
Blind baselineThe agent loop as it stands today~45% (18/40, measured)
Local engineeringExecution-oracle selection, self-verification, verbatim memory, whole-file edits, grammar-constrained tool emission — no new trainingmid-50s to low-60s
TrainingLoRA + distillation on the target distribution~70–80% in-distribution
The wall (Claude's band)The last ~15–20 points — a genuine ceiling for a 4-bit 27B, not a tuning knobClaude 65–72%

Read that carefully. Local engineering — the part Outlier owns and ships — is worth roughly ten points on its own, with no model change at all. Training buys another big jump, but only in-distribution: it makes the agent great at the kind of work it was trained on, not universally smarter. And then there's a wall.

The three hard walls

This is the part most "local AI" writeups skip, because it's the part that doesn't flatter the local model. There are three failures a local 27B does not engineer its way out of. They are structural.

WallWhat it isWhy it's structural
1. Per-token slip floorExact enumeration, counting, arithmetic — the "get every one of these 40 items exactly right" tasksA structural property of a 4-bit 27B. Quantization noise sets a floor on per-token precision that no scaffold removes.
2. Breadth of world & library knowledgeThe long tail of "I just need to know this obscure API / edge case / library quirk"A parameter-count wall. Distillation transfers style, not the fact long-tail — you can't distill knowledge the student has no room to store.
3. Exact recall of a far-back byte-spanReproducing a specific span verbatim from deep in a long contextAttention over a long window is lossy at small scale; the exact bytes from far back get approximated, not recalled.

These three are why the wall exists. Claude clears all three because it has the parameters and the precision budget to. A 27B doesn't, and I'm not going to pretend it does.

Where a local 27B already matches Claude

Now the flip side, and it's a real one. On bounded, in-distribution, testable tasks, the local 27B is already there. This session, running autonomously and verified by running the tests, the local agent built:

BuildResult (verified by running the tests)
Bank Account class with overdraft protection13/13 tests passing
5-file library management systemCorrect borrow/return + edge cases
Contacts app, sqlite-backedPersists and queries correctly
Arithmetic expression evaluatorPrecedence-correct: 2+3*4=14, (2+3)*4=20
33-file autonomous buildEvery file compiles

These aren't cherry-picked one-liners; they're multi-file programs with real edge cases, and they pass the tests. On this class of work — the class most day-to-day coding actually is — you would not feel a downgrade from Claude.

And there's a quieter property that matters more than any single build: it's truthful. When a build's tests fail, the agent reports the failure honestly instead of declaring a false success. A coding agent that lies about passing is worse than useless; one that tells you the truth about where it stands is one you can actually delegate to.

Where it never matches Claude locally

The biggest lever: an execution oracle

If you take one thing from this page, take this. The single highest-leverage change is how you select the answer. There are three ways to pick which of a model's attempts to trust, and they are wildly different in value:

Selection methodWhat it actually checksTrustworthy?
The model approves itselfWhether the model thinks it's rightNo — a confident wrong answer looks identical to a right one
"It compiles"Syntax, not behaviorWeak — compiling code is routinely wrong
Execution oracle (run the tests)Whether the behavior is actually correctYes — the ground truth

Selecting on run-the-tests is what turns a small model's noisy best-of-N attempts into a reliable pass. The model doesn't have to be right on the first try — it has to be right on one try, and the oracle finds it. This is the lever behind most of the local-engineering jump in the roadmap above, and it's the one Outlier leans on hardest.

Self-verification: the agent checks its own work

The newest piece extends the oracle inward. When a test fails, the agent now computes the true answer itself and fixes whichever side is actually wrong — the code, or a test that asserts a wrong value. Crucially, there's a guard that blocks weakening a good test to cheat the check. That guard is the whole game: an agent allowed to edit tests will, if you let it, "fix" a failure by deleting the assertion. Blocking that is what keeps self-verification honest instead of a loophole.

The honest takeaway

Can a local 27B model code like Claude? On bounded, in-distribution, testable work — yes, measurably, today. Across the whole surface — no, and there's a real ~15–20-point wall with three structural causes I won't hand-wave away. The interesting truth is how much of the gap is engineering rather than raw capability: roughly ten points sit in selection, memory, and edit strategy that don't touch the model at all. That's the seam a local coding agent lives in — private, offline, free of usage caps, and honest about where it stands. When the task hits a wall, the right move isn't to pretend; it's to escalate. Everywhere else, the local model earns its keep.

Frequently asked questions

Can a local 27B model code like Claude?

On bounded, in-distribution, testable coding tasks a local 27B model already matches Claude — it built and passed the tests for a bank account class (13/13), a 5-file library system, a sqlite contacts app, and a precedence-correct arithmetic evaluator this session. But it does not match Claude everywhere: a genuine 15–20-point gap remains on breadth-bound work, flawless multi-step novel reasoning with no test to check against, and 40-plus-step autonomous runs.

What did the local 27B score on SWE-bench Verified?

Measured blind, the local 27B agent scored about 45% — 18 of 40 tasks resolved. That is a measured number on real tasks, not a leaderboard entry, and not the full 500-task Verified set.

What is the single biggest lever to close the gap?

An execution oracle: selecting the candidate patch by running the tests, not by whether it compiles and not by letting the model approve its own work. Running the tests turns a small model's noisy best-of-N attempts into a reliable pass, and it is the lever that moves the score most.

Try Outlier free

Free Nano + Lite — local, private, no account. Pro $20/mo or $149/yr adds everything (Plus 397B, Marathon mode, Computer use, Deep Research v3, long context to 128K). Lifetime Pro from $99 (Founding 200, first 200 seats) or $200 (Founders 500). Apple Silicon only.

Download for Mac