Models
The best open-weight models for coding, and which ones run on your own computer
Models you can download, ranked by independent coding tests, with their licenses, the hardware each needs, and the agents that run them.
The strongest open-weight model for coding in October 2026 is Moonshot's Kimi K3.1 Pro, which scored 63.6% on Vals AI's independent Terminal-Bench 4.0 run, close to Claude Opus 5.5's 65.2%; its weights are due by November 4. Behind it, a group scores between about 31% and 39%: GLM 5.3 and Qwen 3.8 Max at 38.9%, GLM 5.3 Flash at 37.4% (MIT license), and DeepSeek V4.1 Flash at 31.8% (MIT). All of those need a server-class machine. On an ordinary computer, the practical choice is Qwen3.8-27B, an 18 GB download in Ollama under Apache 2.0, which fits a 24 GB graphics card or a 32 GB Mac. Open-weight models trail the best closed ones on long agent tasks, but they're free to download, run without sending code anywhere, and can be fine-tuned.
Key takeaways
- Closest to Claude: Kimi K3.1 Pro, 63.6% on Terminal-Bench 4.0 (Opus 5.5: 65.2%); weights promised by November 4, license not yet announced.
- Next tier, ~31–39%: GLM 5.3, Qwen 3.8 Max, GLM 5.3 Flash, DeepSeek V4.1 Flash, MiMo V2.6 Pro.
- Most permissive licenses: MIT for DeepSeek V4.1 Flash, GLM 5.3 Flash and MiMo V2.6 Pro; Apache 2.0 for Qwen3.8-27B and gpt-oss.
- On a laptop or desktop: Qwen3.8-27B (18 GB), Devstral Small 2 (15 GB) or gpt-oss 20b (14 GB) on 24 GB; Qwen3-Coder-Next (52 GB) on a 64 GB Mac.
- Agents for local models: OpenCode, Cline, Codex CLI with
--oss, and Claude Code throughollama launch.
| Model | Terminal-Bench 4.0 | Parameters (total / active) | License | Runs on |
|---|---|---|---|---|
| Claude Opus 5.5 (closed, for reference) | 65.2% | Not published | Closed | Anthropic's API |
| Kimi K3.1 Pro | 63.6% | 3T-class | Due with weights by Nov 4 | Servers |
| GLM 5.3 | 38.9% | 753B | Z.ai's own | Servers |
| Qwen 3.8 Max | 38.9% | 2.4T / 95B | Qwen's own | Servers |
| GLM 5.3 Flash | 37.4% | 320B / 18B | MIT | Servers |
| DeepSeek V4.1 Flash | 31.8% | 552B backbone / 8–16B | MIT | Servers |
| MiMo V2.6 Pro | 31.3% | 1T / 42B | MIT | Servers |
| Mistral Large 4 | 26.3% | ~1T / 52B | Mistral's own | Servers |
| Qwen3-Coder-Next | Not tested | ~80B | Apache 2.0 | 64 GB Mac |
| Qwen3.8-27B | Not tested | 27B | Apache 2.0 | 24 GB GPU or 32 GB Mac |
Sources: Vals AI Terminal-Bench 4.0 (updated October 29), LMArena WebDev (October 27), Artificial Analysis, the models' Hugging Face cards and Ollama's library, opened October 29, 2026.
Which open-weight model is best for coding?
Vals AI runs every model through the same agent on Terminal-Bench 4.0, long terminal tasks. The open-weight results (Vals AI):
- Kimi K3.1 Pro: 63.64%, third of 58 behind only Claude Opus 5.5 and Sonnet 5.5.
- GLM 5.3: 38.89%. Qwen 3.8 Max: 38.89%.
- GLM 5.3 Flash: 37.37%.
- DeepSeek V4.1 Flash (1017): 31.82%.
- MiMo V2.6 Pro (Xiaomi): 31.31%.
- Mistral Large 4: 26.26%. MiniMax M3.1 Flash: 25.25%.
- Kimi K3: 17.17%. Muse Spark Open (Meta): 6.57%.
On LMArena's WebDev board, where people vote on web apps, the open model ranked highest is DeepSeek V4.1 Flash at 16th, then Kimi K3 18th, MiMo V2.6 Flash 22nd, Qwen3.8 Flash Next 24th and GLM 5.3 27th; Kimi K3.1 Pro ranks 9th but is listed as proprietary until its weights ship. Artificial Analysis's Intelligence Index puts DeepSeek V4.1 Flash and GLM 5.3 level at 32, against 46 for K3.1 Pro and 58 for Claude Opus 5.5.
So: if Kimi K3.1 Pro's weights arrive as promised, it will be the clear leader. Until then, GLM 5.3 and Qwen 3.8 lead the downloadable field on agent tasks, and DeepSeek V4.1 Flash on web building.
What do the licenses allow?
- MIT: DeepSeek V4.1 Flash and V4 Pro, GLM 5.3 Flash, MiMo V2.6 Pro. Use, change and sell freely.
- Apache 2.0: Qwen3.8-27B, Qwen3-Coder-Next, Devstral Small 2, gpt-oss. Also permissive, with a patent grant.
- Custom licenses: Kimi K3 (services over $20 million a year need a deal with Moonshot, and very large products must show the name), Muse Spark Open (show "Built with Muse Spark Open"; services over $20 million need a deal with Meta), Mistral Large 4 (selling it as a service needs a separate license), GLM 5.3 and Qwen 3.8 Max (their own terms).
Read the license before building a product on a model; "open weights" doesn't always mean open source.
Which models run on your own computer?
Sizes are Ollama's default downloads (Ollama). You need room beyond the file for the context window, so treat these as minimums:
- A 24 GB graphics card, or a Mac with 32 GB:
qwen3.8:27b(18 GB, Apache 2.0),qwen3.6:27b-coding(18 GB),devstral-small-2:24b(15 GB),gpt-oss:20b(14 GB). On a 32 GB Mac, it's tight. - A Mac with 64 GB:
qwen3-coder-next(52 GB, about 80 billion parameters). - 128 GB of memory:
gpt-oss:120b(65 GB),nemotron-3.5-super:120b(80 GB),qwen3.8-flash-nextin its compressed version (105 GB).
The strongest open models, Kimi, GLM 5.3, DeepSeek V4.1 Flash, MiniMax, Mistral Large 4 and Muse Spark Open, have hundreds of billions to trillions of parameters. Ollama offers them only as cloud models; running them yourself takes a multi-GPU server, or a hosting provider that serves them.
The trade-off is plain: the models that fit a laptop score well below the hosted leaders on long agent tasks. Qwen3.8-27B ranks 34th on LMArena's WebDev board. It's good for private, unlimited everyday help; for the hardest work, closed models or the big open ones on rented hardware do much better.
Which coding agents work with local models?
- OpenCode: Ollama, LM Studio and llama.cpp. If tool calls fail, raise Ollama's context to 16K–32K (OpenCode).
- Cline: Ollama, LM Studio and others (Cline, Cline vs Claude Code).
- Codex CLI:
--osswith Ollama or LM Studio (how to install the Codex CLI). - Claude Code:
ollama launchconnects it to Ollama, though Anthropic doesn't support that setup (Ollama). - Qwen Code, Goose, Kilo and Aider work too (Claude Code alternatives).
When is an open-weight model the right choice?
- Code that can't leave your machines: a local model sends nothing anywhere.
- Heavy, simple, repeated work: no per-token bill once the hardware is paid for.
- Fine-tuning on your own code, which closed models don't allow.
- No usage limits or price changes from a provider.
For the hardest agentic coding, Claude Opus 5.5 and Sonnet 5.5 still lead every independent test, and Kimi K3.1 Pro is the one open model close to them. More on the individual models: Kimi K3 vs Claude, DeepSeek V4 vs Claude, GLM 5, Qwen Coder, Muse Spark, and free options in the best free AI for coding.
Trying the closed models free
Poly (usepoly.co) runs closed models from four labs in a shared browser room, with a free model from each: Claude Sonnet 5.5 and Haiku 5.5, GPT-6 Luna, Grok Build and Muse Spark 1.3. Nothing to install and no API keys. What is Poly?
Common questions
What is the best open-weight model for coding?
Kimi K3.1 Pro, at 63.6% on Vals AI's Terminal-Bench 4.0 against Claude Opus 5.5's 65.2%, once its weights ship by November 4, 2026. Among models already downloadable, GLM 5.3 and Qwen 3.8 Max lead at 38.9%.
What is the best local LLM for coding?
On a 24 GB graphics card or a 32 GB Mac, Qwen3.8-27B (18 GB in Ollama, Apache 2.0). On a 64 GB Mac, Qwen3-Coder-Next. The strongest open models need server hardware.
Are open-weight models as good as Claude?
Not yet on long agent tasks. Only Kimi K3.1 Pro comes close on Vals AI's Terminal-Bench 4.0. The rest of the open field scores between about 25% and 39%, against 64% to 65% for Claude Sonnet 5.5 and Opus 5.5.
Is open weight the same as open source?
Not always. MIT and Apache 2.0 models can be used freely, but several leading models use custom licenses that add conditions for large commercial services or require showing the model's name.
Which coding agents can use local models?
OpenCode, Cline, Codex CLI with --oss, Qwen Code, Goose, Kilo and Aider work with Ollama or LM Studio. Claude Code can connect through ollama launch, which Anthropic doesn't support.