Best Open Weight Coding Models in October 2026
The best open weight coding models on 4 October 2026, ranked with dated scores, licences, hardware needs and Claude Code setup for local and hosted use.

The best open weight coding models on 4 October 2026 are Kimi K3, GLM-5.3 and DeepSeek V4.1 Flash if you can use a hosted API, and Qwen3.8-27B if you want one model on one GPU. Qwen3.8-27B is Apache-2.0, Ollama lists it at 18GB, and it ranks 14th of 125 on LMArena's WebDev leaderboard. Most 2026 model cards no longer publish SWE-bench Verified, so this guide uses the benchmarks the sources actually publish and dates each one.
Which open-weight models are best for coding right now?
Scores come from LMArena's Code Arena WebDev leaderboard (page stamped 2 September 2026, 640,806 votes, 125 models, read 4 October 2026) and from each lab's model card. First place on that leaderboard is a closed model, claude-fable-5.1-max, at 1765. Lab-reported numbers are self-reported.
| Model | Size (total / active) | Licence | Code Arena rank and score | Lab-reported coding |
|---|---|---|---|---|
| Kimi K3 | 2.8T / 104B | Kimi K3 licence | 4th, 1674 | Terminal Bench 2.1 88.3, DeepSWE 67.5 |
| GLM-5.3 | 753B / 40B | MIT-style | 12th, 1609 | Terminal Bench 2.1 88.2, DeepSWE 66.9 |
| GLM-5.3-Flash | 321B / 18B | MIT | 13th, 1604 | not published on the card we read |
| Qwen3.8-27B | 27.8B dense | Apache-2.0 | 14th, 1597 | SWE-bench Pro 61.7, LiveCodeBench v6 90.3 |
| DeepSeek V4-Pro-0813 | 1.6T / 49B | MIT | 17th, 1582 | Terminal Bench 2.1 87.9, DeepSWE 62.7 |
| DeepSeek V4.1 Flash | 552B / 16B | MIT | V4 Flash 18th, 1581 | Terminal Bench 2.1 90.6, DeepSWE 74.2 (DeepSeek's own table) |
| MiniMax-M3 | 428B / 23B | MiniMax Community | 43rd, 1487 | not published on the card |
| Kimi K2.7 Code | about 1T | Modified MIT | 47th, 1473 | Kimi Code Bench v2 62.0 |
| Devstral 2 (123B) | 123B dense | Modified MIT | 119th, 1194 | SWE-bench Verified 72.2% (Nov 2025 card) |
| gpt-oss-120b | 116.8B | Apache-2.0 | not listed | not published |
Sizes for Kimi K3, GLM-5.3, DeepSeek V4.1 Flash and MiniMax-M3 are from Artificial Analysis' open-source table. The V4.1 Flash row mixes a V4 Flash arena score with V4.1 card numbers because the arena list we read has no V4.1 entry.
"Open weight" means you can download the weights. It does not mean the training data or training code are public, and it says nothing about the licence. Artificial Analysis scores openness separately with its Openness Index, so we call these models open-weight throughout.
Which coding benchmarks can you trust?
None alone. Code Arena measures human votes on web-development tasks. Terminal Bench 2.1 and DeepSWE measure agents finishing tasks in a terminal or repository, and the harness changes the result: DeepSeek's V4.1-Flash card shows 65.5 to 74.2 on DeepSWE across five agent scaffolds, from OpenCode to mini-SWE.
SWE-bench Verified now appears only on older cards. The latest we found is Mistral's Devstral 2 card from November 2025, which lists 72.2% for the 123B model and 68.0% for the 24B Devstral Small 2. LiveCodeBench v6 appears on the Qwen3.8-27B card (90.3, against 88.8 for Opus 4.6 Max in Qwen's table). We found no 2026 Aider polyglot figure from a primary source, so we leave it out.
Our read. Dedicated coder fine-tunes are losing to general flagships. On Code Arena, Qwen3-Coder-480B ranks 106th (1274) and Devstral 2 119th (1194), while the general Qwen3.8-27B ranks 14th. Age explains part of that, since both are 2025 releases. Moonshot's own coder-tuned K2.7 Code (repository dated 11 June 2026) ranks 47th, well below the general K3 (13 June) at 4th.
What do the licences allow?
- MIT: DeepSeek V4 and V4.1 Flash, GLM-5.3-Flash.
- Apache-2.0: Qwen3.8-27B, gpt-oss, Devstral Small 2.
- GLM-5.3: MIT-style, with a security-review clause for model-as-a-service operators above US$10 billion in revenue.
- Kimi K3: internal use is exempt from its extra terms. Model-as-a-service businesses above US$20M need an agreement, and large products must show the name.
- MiniMax-M3: commercial use needs a "Built with MiniMax M3" notice, and over US$20M yearly revenue needs written authorization.
- Kimi K2.7 Code: Modified MIT, with name display above 100M monthly users or US$20M monthly revenue.
- Devstral 2 (123B): Modified MIT that grants no rights if your company's monthly revenue exceeds US$20M, unless you buy a commercial licence from Mistral.
Read the licence file on each Hugging Face page before shipping a product.
What hardware do you need to run them locally?
Weights at 4-bit take roughly parameters × 0.5 bytes. That is our arithmetic and ignores the KV cache, which grows with context.
| Model | Size on disk or estimate | Realistic target (our estimate) |
|---|---|---|
| Qwen3.8-27B | 18GB (Ollama) | 24GB GPU or 32GB unified memory, our estimate |
| Devstral Small 2 | 15GB (Ollama) | 16 to 24GB GPU |
| gpt-oss-20b / 120b | 14GB / 65GB (Ollama) | 16GB GPU / one 80GB GPU, our estimate |
| DeepSeek V4.1 Flash | about 276GB (552B × 0.5) | Multi-GPU server |
| GLM-5.3 | about 377GB (753B × 0.5) | Multi-GPU server |
| Kimi K3 | about 1.4TB (2.78T × 0.5) | Cluster, or hosted |
The big models are hosted-API territory. Ollama Cloud serves glm-5.3:cloud, minimax-m3:cloud and kimi-k2.7-code:cloud, and OpenRouter lists z-ai/glm-5.3, moonshotai/kimi-k3, deepseek/deepseek-v4.1-flash, qwen/qwen3.8-27b and minimax/minimax-m3 (checked 4 October 2026). Model cards recommend SGLang, vLLM, KTransformers or Unsloth for self-hosting.
How do you use them with Claude Code and other agents?
Anthropic's gateway documentation states it does not support routing Claude Code to non-Claude models through any gateway. It works technically through ANTHROPIC_BASE_URL, so you use it at your own risk and under each provider's terms. Our full walkthrough covers the details.
Local with Ollama
ollama pull qwen3.8
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://localhost:11434
claude --model qwen3.8
Ollama's guide says local models need a 64k or larger context window for bigger repositories. ollama launch claude automates the setup.
Local with LM Studio or llama.cpp
LM Studio serves an Anthropic-compatible /v1/messages endpoint: set ANTHROPIC_BASE_URL=http://localhost:1234 and ANTHROPIC_AUTH_TOKEN=lmstudio, per its Claude Code page, and use a context above about 25k. llama.cpp's llama-server exposes /v1/messages too, and tool use needs the --jinja flag.
Hosted with OpenRouter
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
export ANTHROPIC_API_KEY=""
export ANTHROPIC_DEFAULT_SONNET_MODEL="z-ai/glm-5.3"
That follows OpenRouter's Claude Code guide, with a non-Claude model ID in the Sonnet slot. Test it before relying on it. Several labs also ship their own Anthropic-compatible endpoints, covered in our plans comparison. The model-native CLIs, Kimi Code for K3 and Mistral Vibe for Devstral, avoid the gateway question.
How can you test candidates on your own repository?
A leaderboard cannot know your codebase. An afternoon of testing can.
- Pick 20 real tasks from your history: bug fixes with a failing test, small features, refactors. Record the commit each started from.
- Run every candidate model in the same agent harness, with the same prompt, on a clean checkout.
- Repeat each task at least three times. DeepSeek's card uses 8 samples per task on DeepSWE and 3 on Terminal Bench 2.1 because single runs vary.
- Record pass rate, wall-clock time and cost per task, then compare those three numbers, not the leaderboard rank.
This is the same approach as the evaluation sets we use for routing decisions, applied to code.
How do the hosted prices compare?
List prices per 1M tokens from each lab's pricing page, read 4 October 2026, before caching and taxes:
| Model | Input | Output |
|---|---|---|
| GLM-5.3-Flash | $0.15 | $0.50 |
| DeepSeek V4.1 Flash (off-peak to peak) | $0.15–0.30 | $0.60–1.20 |
| MiniMax-M3 | $0.30 | $1.20 |
| Kimi K2.7 Code | $0.95 | $4.00 |
| GLM-5.3 | $1.40 | $4.40 |
| Kimi K3 | $3.00 | $15.00 |
A coding session of 3M uncached input tokens plus 150K output tokens costs about $4.86 on GLM-5.3 ($1.40 × 3 + $4.40 × 0.15) and about $11.25 on Kimi K3. Prompt caching lowers both.
Speed matters in agent loops too. Artificial Analysis' leaderboard lists median output speeds of about 213 tokens per second for DeepSeek V4.1 Flash (max), 71 for GLM-5.3 (max) and 36 for Kimi K3 (max). At equal output length the first generates tokens about six times faster than the last (213 ÷ 36 ≈ 5.9), which can outweigh a small score difference. Speeds vary by provider.
Which model should you pick for your need?
| Need | Pick | Why |
|---|---|---|
| Strongest open weights via API | Kimi K3 | 4th on Code Arena WebDev (1674), 1M context |
| Best value hosted | GLM-5.3, DeepSeek V4.1 Flash | $1.40 / $4.40 and $0.15–0.30 / $0.60–1.20 per 1M tokens |
| One GPU, permissive licence | Qwen3.8-27B | Apache-2.0, 14th on Code Arena, 18GB |
| Laptop-size agent | Devstral Small 2, gpt-oss-20b | 15GB and 14GB, Apache-2.0 |
| 1M-token context | Kimi K3, GLM-5.3, DeepSeek V4, MiniMax-M3 | All list 1M context |
| Strictest data control | Any model you host | No third-party processing |
For the wider US versus China picture, see Chinese AI models vs the US frontier.
How Danube Labs can help
Danube Labs builds My Claude Code, a local gateway that routes coding agents to 57 providers including Ollama, LM Studio and llama.cpp, with per-request cost logging (project page). For model selection on your own codebase, see AI systems or book a free intro call.
Frequently asked questions
- What is the best open weight model for coding in 2026?
- On 4 October 2026, Kimi K3 is the highest-ranked open-weights model on LMArena's WebDev leaderboard, 4th at 1674. GLM-5.3 follows at 12th and Qwen3.8-27B at 14th. The best choice depends on whether you need an API, one GPU, or a permissive licence, so match the model to that need.
- What is the best local model for coding?
- For one consumer GPU, Qwen3.8-27B is our first pick: Apache-2.0, 18GB on Ollama, 256K context, 14th on Code Arena WebDev. Devstral Small 2 (24B, 15GB) and gpt-oss-20b (14GB) suit smaller machines. Set a context of 64k or more for agent use, as Ollama advises.
- Can I use open-weight models with Claude Code?
- Technically yes, through ANTHROPIC_BASE_URL with Ollama, LM Studio, llama.cpp or OpenRouter. Anthropic's gateway docs say it does not support routing Claude Code to non-Claude models, so you use it at your own risk and under each provider's terms. Model-native CLIs such as Kimi Code avoid the question.
- Is SWE-bench Verified still used for open models?
- Rarely in 2026. The Kimi K3, GLM-5.3, DeepSeek V4.1 and Qwen3.8 cards we read report Terminal Bench 2.1, DeepSWE and SWE-bench Pro instead. Mistral's November 2025 Devstral 2 card is the latest we found with SWE-bench Verified, at 72.2% for the 123B model.
- Which open-weight coding models are free for commercial use?
- DeepSeek V4 (MIT), GLM-5.3-Flash (MIT), Qwen3.8-27B, gpt-oss and Devstral Small 2 (Apache-2.0) have no extra commercial conditions beyond the standard notice. Kimi K3, GLM-5.3, MiniMax-M3, Kimi K2.7 Code and Devstral 2 add attribution or revenue-based terms, and Devstral 2 grants no rights above US$20M monthly company revenue. Read each licence file before shipping.


