5 Local Coding Models I Keep Installed in 2026
I still use cloud APIs for genuinely hard problems, but a lot of my day-to-day coding work has moved to models running on my own machine. Latency is lower, nothing leaves my laptop, and once a model is loaded the incremental cost is basically zero.
The surprise is that small models are now good enough for real work. With 4-bit quantization and newer distillation techniques, a laptop with 16–32 GB of RAM can run models that handle refactoring, scaffolding, debugging, and code review without calling an API.
These are the five models I currently keep around.
1. Qwen2.5-Coder — the default recommendation
Qwen2.5-Coder 32B Instruct is the most polished open coding family I have used. The family also includes 7B and 14B variants, all with a 131K context window.
The 14B version at 4-bit uses roughly 7–8 GB for the weights alone. Add the OS, KV cache, and whatever browser tabs you have open, and 16 GB of total system RAM is the realistic floor. It responds fast enough to stay in flow and handles Python, TypeScript, Java, shell scripts, and config files competently.
The 32B version is stronger at architecture-level reasoning, but the weights alone need 16–18 GB at 4-bit. You want 32 GB of system RAM or a GPU with 20 GB+ of VRAM to run it comfortably.
What makes it the safe default is the ecosystem: ready-to-use GGUF and AWQ quants, usable tool-calling, and a large community keeping it current.
- Best for: daily coding, autocomplete, small refactors, unit tests.
- Context: 131K tokens.
- Hardware: 8 GB total RAM for 7B; 16 GB for 14B; 32 GB or a modern GPU for 32B.
- Run it with: Ollama, LM Studio, llama.cpp, or vLLM.
2. DeepSeek-R1-Distill-Qwen-14B — for the weird bugs
DeepSeek-R1-Distill-Qwen-14B is a distilled version of DeepSeek-R1. It was trained on long chain-of-thought traces, so it "thinks out loud" before answering. The family also includes 1.5B, 7B, and 32B variants, all with a 128K context window.
That makes it slower and more verbose than Qwen2.5-Coder, but it is the model I reach for when a bug is subtle or when I need a careful code review. It catches edge cases in concurrent code, state machines, and algorithmic logic that smaller or narrower models miss.
The trade-off is real: reasoning traces consume context and increase time-to-first-token. I keep prompts short and use 4-bit quantization. The 14B version needs roughly the same memory as Qwen2.5-Coder-14B: 7–8 GB for weights, 16 GB total RAM to be safe.
- Best for: debugging, reasoning-heavy tasks, careful reviews.
- Context: 128K tokens.
- Hardware: 16 GB total RAM for 14B; 8 GB for 7B; 32 GB or GPU for 32B.
-
Run it with: Ollama (
ollama run deepseek-r1:14b), LM Studio, or KTransformers.
3. Phi-4 14B — the efficient generalist
Phi-4 14B from Microsoft is trained on synthetic textbooks, filtered web, and reasoning data. It is not a code-only model, but it is useful for tasks that need concise, well-structured output.
I use it for JSON generation, quick scaffolding, CLI wrappers, and explaining existing code. It is less creative than Qwen2.5-Coder on open-ended prompts, but more disciplined when the task is well-defined.
At 4-bit the weights take roughly 7–8 GB. It is one of the lighter 14B-class models to run without a GPU, but I would still want 16 GB of total system RAM for a smooth experience.
- Best for: structured output, scaffolding, explaining code.
- Context: 16K tokens.
- Hardware: 16 GB total RAM.
- Run it with: Ollama, LM Studio, or vLLM.
4. Bonsai 27B — the one that changes the size math
Most local models feel like a compromise: smaller, but weaker or slower. Bonsai 27B is the first model I tested that made me question whether the compromise is still necessary.
Prism ML distilled a Qwen3.6-27B-class teacher into mostly 1-bit and ternary weights. The result is a ~3.9 GB file that still scores well on coding benchmarks. The trick is that the student was trained inside the low-bit alphabet from the start, not compressed after training.
It is not as polished as Qwen2.5-Coder for everyday use, and the tooling ecosystem is smaller. But it proves that local coding assistants can shrink dramatically without collapsing.
- Best for: testing the frontier of tiny local models.
- Context: long context window.
- Hardware: 8 GB total RAM.
- Run it with: Prism ML's own tools or the Bonsai-compatible forks of llama.cpp and MLX.
5. GLM-4-9B-Chat — when the context is not English
GLM-4-9B-Chat from Z.ai is a dense 9B model with strong multilingual support and a 128K context window. It is not the strongest pure coder here, but it is the most useful when I am reading documentation, comments, or issues in languages other than English.
The long context is also handy for dropping a larger file or a small module into the prompt without aggressive trimming. At 4-bit the weights use roughly 4.5–5 GB, so 8 GB of total RAM is enough for light use.
- Best for: multilingual work, long-context reading, lighter coding tasks.
- Context: 128K tokens.
- Hardware: 8 GB total RAM.
-
Run it with: Hugging Face Transformers with
trust_remote_code=True, vLLM, or LM Studio.
How I pick one
My workflow is simple:
- Quick edits and autocomplete: Qwen2.5-Coder 14B.
- Weird bug or careful review: DeepSeek-R1-Distill-Qwen-14B.
- Structured JSON or a small script: Phi-4 14B.
- Curiosity or limited bandwidth: Bonsai 27B.
- Non-English context or long file: GLM-4-9B.
One model rarely does everything, so I keep a few loaded for different jobs.
A realistic note on memory
The numbers above are weight sizes. At 4-bit, each billion parameters needs roughly 0.5 GB of storage. But running a model also needs space for the KV cache, activation buffers, and your operating system. Context length matters: a 131K context consumes far more KV memory than a 4K context.
That is why the practical minimums are higher than a naive calculation:
- 7B–9B models: 8 GB total RAM is the realistic floor.
- 14B models: 16 GB total RAM is the realistic floor.
- 27B–32B models: 32 GB total RAM or a dedicated GPU is much safer.
If your machine is tight on RAM, use a smaller context window and close other apps. Offloading to disk works in a pinch, but it is slow.
What I am watching next
The most interesting question right now is not whether 14B models can code — we already know they can. It is whether extreme compression can push 27B-class quality into a 3–4 GB package without destroying reasoning. Bonsai 27B is the first convincing case. If that recipe spreads to other coding models, the hardware floor for local assistants drops again.
I wrote a hands-on post about running Bonsai 27B for coding on my own technical blog, including what worked, what did not, and why I think it matters.
If you are running local coding models, what is in your rotation?
Top comments (0)