Guides / Coding
Best small open models for coding
Updated November 2026
As of November 2026, the best option is Qwen3.8 27B by Alibaba (Qwen), with a Coding score of 83.5, followed by Ternary Bonsai 2 27B (81.0) and Qwen3.6 27B (80.6).
Ranked by the average of LiveCodeBench (competitive programming) and SWE-bench Verified (fixing real GitHub issues). Where a lab did not report one of them, the index model’s estimate is used and marked.
| # | Model | Lab | Coding score | Index | Params | Memory (4-bit) | API / 1M | License |
|---|---|---|---|---|---|---|---|---|
| 1 | Qwen3.8 27B | Alibaba (Qwen) | 83.5≈ | 77.0 | 27B | ~17.9 GB | $0.13 | Apache-2.0 |
| 2 | Ternary Bonsai 2 27B | PrismML | 81.0≈ | 74.6 | 27.4B | ~18.2 GB | self-host | Apache-2.0 |
| 3 | Qwen3.6 27B | Alibaba (Qwen) | 80.6 | 74.0 | 27B | ~17.9 GB | $0.90 | Apache-2.0 |
| 4 | Muse Glimmer 30B | Meta | 79.5≈ | 72.6 | 29.6B | ~19.2 GB | $0.53 | Apache-2.0 |
| 5 | Qwen3.5 27B | Alibaba (Qwen) | 77.8 | 70.6 | 27B | ~17.9 GB | $0.69 | Apache-2.0 |
| 6 | Qwen3.6 35B-A3B | Alibaba (Qwen) | 76.9 | 72.2 | 35B (3B active) | ~22.6 GB | $0.031 | Apache-2.0 |
| 7 | Kolibri-1 | Aleph Alpha | 76.2 | 68.3 | 78.1B (3.5B active) | ~49.6 GB | self-host | Apache-2.0 |
| 8 | Qwen3.5 35B-A3B | Alibaba (Qwen) | 72.3 | 69.9 | 35B (3B active) | ~22.6 GB | $0.24 | Apache-2.0 |
| 9 | Spark-X2.6 4B | SparkLLM (XHToken) | 70.2≈ | 67.5 | 4.1B | ~3.4 GB | self-host | Apache-2.0 |
| 10 | Nanbeige4.2 3B | Nanbeige (Kanzhun) | 68.0 | 70.4 | 4.2B | ~3.8 GB | self-host | Apache-2.0 |
| 11 | Granite 4.2 30B | IBM (Granite) | 66.8≈ | 67.0 | 30B | ~21.4 GB | self-host | Apache-2.0 |
| 12 | Gemma 4 31B | 66.0 | 70.1 | 30.7B | ~21.9 GB | $0.16 | Apache-2.0 | |
| 13 | Nemotron 3.5 Lightning | NVIDIA | 62.4≈ | 63.6 | 31.6B (3.6B active) | ~22.4 GB | $0.049 | OpenMDW-1.1 |
| 14 | Granite 4.2 8B | IBM (Granite) | 62.4≈ | 63.5 | 8B | ~6.9 GB | $0.082 | Apache-2.0 |
| 15 | OLMo 3.1 32B Think | Ai2 (OLMo) | 62.1≈ | 57.0 | 32.2B | ~22 GB | self-host | Apache-2.0 |
Memory covers the weights only; long contexts need more. Scores are mostly lab-reported, so gaps of 1–2 points are noise. See the methodology, or filter the full leaderboard yourself.
Head to head
Questions
What is the best small open-weight model for coding?
As of November 2026, the best option is Qwen3.8 27B by Alibaba (Qwen), with a Coding score of 83.5, followed by Ternary Bonsai 2 27B (81.0) and Qwen3.6 27B (80.6).
How is this list ranked?
Ranked by the average of LiveCodeBench (competitive programming) and SWE-bench Verified (fixing real GitHub issues). Where a lab did not report one of them, the index model’s estimate is used and marked.
Which of the top five needs the least memory?
Qwen3.8 27B, at about 17.9 GB with 4-bit quantization.
Which is the cheapest to use through an API?
Qwen3.6 35B-A3B, at $0.031 per million tokens from the cheapest provider on OpenRouter.
Other guides
- Best small open models for math
- Best LLMs that run on an 8 GB GPU or laptop
- Best LLMs that run on a 16 GB GPU
- Best LLMs for a 24 GB GPU (RTX 4090, RTX 3090)
- Best tiny LLMs for phones and edge devices
- Best cheap LLM APIs (open models)
- Best small open vision-language models
- Best open models with an Apache 2.0 or MIT license
- Best European open language models
- Best American open models under 100B
- Best fully open models (open data and code)