The best local LLMs for coding in 2026
The open-weight coding models got genuinely good in 2026. Good enough that a model on your own hardware is a real teammate, not a toy. But "best" depends entirely on how much fast memory you've got. Here are the picks that earn their disk space, ranked by hardware tier, with the honest gap to the hosted frontier.
First: it's about memory, not the GPU brand
A model runs well only if its weights fit in fast memory (GPU VRAM, or unified memory on a Mac). At int4, per the quantization sweet spot, the rough sizing runs: 7B ≈ 4–5 GB, 32B ≈ 18–22 GB, 70B ≈ 38–44 GB, the big MoE models 120 GB+. Pick the best model that fits, then find the cheapest hardware that holds those gigabytes (often a Mac, thanks to unified memory). For sizing details, see what hardware runs these models.
The picks, by tier
| Tier | Hardware | Best pick | Also good |
|---|---|---|---|
| Laptop | 16–32 GB, no GPU / Apple Silicon | Qwen3-Coder 14B (int4) | Codestral, DeepSeek V4 Flash-distill |
| Workstation | one 24–48 GB GPU / 32–64 GB Mac | Qwen3-Coder 30B–480B (int4) | GLM-5, Kimi K2.6 |
| Server | multi-GPU / 128 GB+ Mac | GLM-5 / Kimi K2.6 (full MoE) | Qwen3-Coder 480B, DeepSeek V4 |
Workstation / server: the real coding models
- Qwen3-Coder (Alibaba): the most consistently strong open code specialist. The 480B MoE at int4 is a genuine agentic coder, and the 30B fits a single big GPU. It's the default recommendation for most serious local setups.
- GLM-5 (Zhipu/Z.ai): reportedly ~77.8% on SWE-bench Verified, putting it near the top of the benchmark among open weights. Excellent if it fits. (Note: the newer GLM-5.2 shipped without benchmarks; wait for numbers before trusting it.)
- Kimi K2.6 (Moonshot): a 1T-parameter MoE tuned for agentic coding, with strong tool-use behavior. Hefty to host.
- DeepSeek V4 (Pro/Flash): open, frontier-adjacent, and absurdly cheap to run. Flash is the value champion when you want capable-and-fast.
Laptop: capable, within reason
- Qwen3-Coder 14B (int4): the best all-rounder that fits 16–32 GB. Real autocomplete and single-file help, not repo-scale agents.
- Codestral (Mistral): a lightweight code specialist tuned for completion. Fast and small.
Quantization: the lever that makes it fit
Always run int4 unless you have a specific reason not to: the quality loss versus fp16 is small and the memory savings are huge (a 70B drops from ~140 GB to ~35 GB). Use the GGUF format that Ollama and llama.cpp consume, or the MLX 4-bit weights on a Mac. Below 4-bit, degradation gets real fast; that's a "desperate" setting, not a default. For the full reasoning, see running models locally.
The honest gap to the frontier
Be clear-eyed: the strongest hosted models (benchmark) are still ahead of the best open weights on the hardest tasks, and they always will be a step ahead. The winning move is the local-first cascade: run a local model for the private, verifiable, high-volume 80% for free, and escalate the hard 20% to a paid frontier model. Best of both: zero marginal cost where it works, frontier capability where it's needed.
How to actually choose
- Check your memory budget. That sets your tier and rules out most of the list instantly.
- Match model to use case. Autocomplete and single-file → a 14–30B is plenty. Repo-scale agentic work → the biggest MoE you can host, or escalate to the cloud.
- Run it before you judge it. A 7B underperforming on agentic coding is an under-provisioning problem, not proof "local can't"; see squeezing the local tier.
Point it at your editor. The complete setup guide takes you from zero to a private coding model in about fifteen minutes.