Best local coding model.
Pick the model for your memory, then run it in a coding app. Every pick comes from published scores.
| Memory | Model | Needs | Terminal-Bench 2.1 | Score (AA) | Run it |
|---|---|---|---|---|---|
| 8 GB | none scored | — | — | — | — |
| 16 GB | Ornith 1.5 9B | 8.8 GB | — | — | ollama run ornith-1.5:9b |
| 24 GB | NousCoder 14B | 12.3 GB | — | — | — |
| 32 GB | Qwen3.8 27B | 22.7 GB | 79.8% | 33.7 | ollama run qwen3.8:27b |
| 48 GB | Qwen3.8 27B | 22.7 GB | 79.8% | 33.7 | ollama run qwen3.8:27b |
| 64 GB | Qwen3.8 27B | 22.7 GB | 79.8% | 33.7 | ollama run qwen3.8:27b |
| 96 GB | Qwen3.8 27B | 22.7 GB | 79.8% | 33.7 | ollama run qwen3.8:27b |
| 128 GB | Qwen3.8 27B | 22.7 GB | 79.8% | 33.7 | ollama run qwen3.8:27b |
| 192 GB | Qwen3.8-Flash-Next (125B-A6B) | 140 GB | 86.1% | 39.8 | ollama run qwen3.8-flash-next:125b-a6b |
| 256 GB | Qwen3.8-Flash-Next (125B-A6B) | 140 GB | 86.1% | 39.8 | ollama run qwen3.8-flash-next:125b-a6b |
| 512 GB | GLM-5.3-Flash | 233 GB | 84.3% | 41.8 | MLX only (Mac) |
Coding apps that run local models.
OpenAI's agent on gpt-oss locally.
ollama launch codex or codex --oss -m gpt-oss:120b
Fast editor with a built-in agent.
In settings set the Ollama "api_url": "http://localhost:11434"; Zed discovers pulled models
Local coding agent inside VS Code.
Pick provider "Ollama" with Base URL http://localhost:11434, then enable "Use Compact Prompt"
Extensible agent, desktop app or CLI.
goose configure > Configure Providers > Ollama (defaults to localhost:11434)
VS Code and JetBrains agent with local models.
Settings > Providers > add Ollama (no API key), then set "Context Window Size (num_ctx)"
Short answers.
- What is the best local coding model for 16 GB?
- Ornith 1.5 9B (needs 8.8 GB).
- What is the best local coding model for 128 GB?
- Qwen3.8 27B (needs 22.7 GB at 4-bit, 36.5 GB at 8-bit, Terminal-Bench 2.1 79.8%).
- Is a local coding model as good as Claude?
- Not yet. Qwen3.8 27B scores 33.7 on the Artificial Analysis index; Claude Opus 5.5 scores 57.6. That is about 59%. Good for everyday work; use a paid model for the hardest tasks.
- Which app should I use for local coding?
- OpenCode: All-round local coding in the terminal (ollama launch opencode). Codex CLI: OpenAI's agent on gpt-oss locally (ollama launch codex or codex --oss -m gpt-oss:120b). Zed: Fast editor with a built-in agent (In settings set the Ollama "api_url": "http://localhost:11434"; Zed discovers pulled models).
- How much context does a coding agent need?
- Coding apps send a lot of text. OpenCode asks for at least 64k tokens of context. More context needs more memory on top of the model size.
Scores are from Artificial Analysis and LMArena, not our own tests yet. Memory need = 4-bit file × 1.15 + 2 GB; a model fits when that is at most 75% of memory. Models 2026-10-15, machines 2026-10-15.
# Best local coding model by memory URL: https://insidethemachine.ai/best/local-coding-model Data: models 2026-10-15, apps 2026-10-15. Picks: the site's best_coding per memory tier in models.json. | memory GB | model | needs GB | Terminal-Bench 2.1 | AA | run | |---|---|---|---|---|---| | 8 | none scored | - | - | - | - | | 16 | Ornith 1.5 9B | 8.8 | - | - | `ollama run ornith-1.5:9b` | | 24 | NousCoder 14B | 12.3 | - | - | - | | 32 | Qwen3.8 27B | 22.7 | 79.8% | 33.7 | `ollama run qwen3.8:27b` | | 48 | Qwen3.8 27B | 22.7 | 79.8% | 33.7 | `ollama run qwen3.8:27b` | | 64 | Qwen3.8 27B | 22.7 | 79.8% | 33.7 | `ollama run qwen3.8:27b` | | 96 | Qwen3.8 27B | 22.7 | 79.8% | 33.7 | `ollama run qwen3.8:27b` | | 128 | Qwen3.8 27B | 22.7 | 79.8% | 33.7 | `ollama run qwen3.8:27b` | | 192 | Qwen3.8-Flash-Next (125B-A6B) | 140 | 86.1% | 39.8 | `ollama run qwen3.8-flash-next:125b-a6b` | | 256 | Qwen3.8-Flash-Next (125B-A6B) | 140 | 86.1% | 39.8 | `ollama run qwen3.8-flash-next:125b-a6b` | | 512 | GLM-5.3-Flash | 233 | 84.3% | 41.8 | `mlx_lm.generate --model mlx-community/GLM-5.3-Flash-4bit --prompt 'hello'` | ## Apps that run them locally - OpenCode (terminal, MIT): All-round local coding in the terminal. Local: `ollama launch opencode`. Needs 64,000 context. https://opencode.ai - Codex CLI (terminal, Apache-2.0): OpenAI's agent on gpt-oss locally. Local: `ollama launch codex` or `codex --oss -m gpt-oss:120b`. Needs 64,000 context. https://github.com/openai/codex - Zed (desktop app, GPL-3.0-or-later): Fast editor with a built-in agent. Local: In settings set the Ollama `"api_url": "http://localhost:11434"`; Zed discovers pulled models. https://zed.dev - Cline (IDE extension, Apache-2.0): Local coding agent inside VS Code. Local: Pick provider "Ollama" with Base URL `http://localhost:11434`, then enable "Use Compact Prompt". https://cline.bot - Goose (desktop app, Apache-2.0): Extensible agent, desktop app or CLI. Local: `goose configure` > Configure Providers > Ollama (defaults to `localhost:11434`). https://goose-docs.ai - Kilo Code (IDE extension, MIT): VS Code and JetBrains agent with local models. Local: Settings > Providers > add Ollama (no API key), then set "Context Window Size (num_ctx)". Needs 32,000 context. https://kilo.ai ## Questions **What is the best local coding model for 16 GB?** Ornith 1.5 9B (needs 8.8 GB). **What is the best local coding model for 128 GB?** Qwen3.8 27B (needs 22.7 GB at 4-bit, 36.5 GB at 8-bit, Terminal-Bench 2.1 79.8%). **Is a local coding model as good as Claude?** Not yet. Qwen3.8 27B scores 33.7 on the Artificial Analysis index; Claude Opus 5.5 scores 57.6. That is about 59%. Good for everyday work; use a paid model for the hardest tasks. **Which app should I use for local coding?** OpenCode: All-round local coding in the terminal (ollama launch opencode). Codex CLI: OpenAI's agent on gpt-oss locally (ollama launch codex or codex --oss -m gpt-oss:120b). Zed: Fast editor with a built-in agent (In settings set the Ollama "api_url": "http://localhost:11434"; Zed discovers pulled models). **How much context does a coding agent need?** Coding apps send a lot of text. OpenCode asks for at least 64k tokens of context. More context needs more memory on top of the model size.