Best MoE Models for Local Coding?
By Hans Kuepper · Founder of PromptQuorum · Discovery engine for open-weight & open-source AI
Key Takeaways
- ✓MoE models load every expert into memory but compute only 3–5B active parameters per token, so they run faster than dense models of the same file size, not in less memory
- ✓gpt-oss-20b (14 GB on Ollama) is the MoE pick for 16 GB; Qwen3-Coder-30B-A3B and GLM-4.7-Flash (19 GB each) fit a 24 GB GPU
- ✓Qwen3.6-35B-A3B (~24 GB) reports 73.4 on SWE-bench Verified on its model card, the highest figure of the models compared here, and suits 32 GB of memory
- ✓Qwen3-Coder-Next (52 GB) and gpt-oss-120b (65 GB) need 64–80 GB of unified memory or VRAM

Quick Answer
Qwen3.6-35B-A3B has the highest vendor-reported SWE-bench Verified score of the models compared here and suits 32 GB of memory, Qwen3-Coder-30B-A3B fits a 24 GB GPU, and gpt-oss-20b fits 16 GB. MoE models compute only 3–5B active parameters per token, so they run fast, but they still need memory for all experts.
- ▸16 GB: gpt-oss-20b (21B total, 3.6B active, 14 GB on Ollama)
- ▸24 GB: Qwen3-Coder-30B-A3B or GLM-4.7-Flash (19 GB each)
- ▸32 GB+: Qwen3.6-35B-A3B (~24 GB); 64–80 GB: Qwen3-Coder-Next, gpt-oss-120b
MoE Models Need Memory for Total Parameters, Not Active Ones
A Mixture of Experts (MoE) model routes each token through a few expert sub-networks, so speed follows the active parameters while memory follows the total parameters. Qwen3.6-35B-A3B has 256 experts and activates 8 routed plus 1 shared expert per token (3B of 35B parameters), according to its Hugging Face model card.
A 3B-active MoE therefore generates tokens at roughly the cost of a small dense model, but its 14–24 GB download must still sit in VRAM or fast unified memory. The sizes in the table are Ollama downloads; add headroom for the context cache.
Model-card benchmark scores are vendor-reported on different agent setups: SWE-bench Verified is 73.4 for Qwen3.6-35B-A3B, 70.6 for Qwen3-Coder-Next and 59.2 for GLM-4.7-Flash. Treat them as directional rather than a head-to-head; PromptQuorum did not re-run them.
| Model | Total / active | Ollama size | Memory tier |
|---|---|---|---|
| Qwen3.6-35B-A3B | 35B / 3B | ~24 GB | 32 GB |
| Qwen3-Coder-30B-A3B | 30B / 3.3B | 19 GB | 24 GB |
| GLM-4.7-Flash | 30B / 3B | 19 GB | 24 GB |
| gpt-oss-20b | 21B / 3.6B | 14 GB | 16 GB |
| Qwen3-Coder-Next | 80B / 3B | 52 GB | 64 GB |
| gpt-oss-120b | 117B / 5.1B | 65 GB | 80 GB |
Pick the MoE Model That Matches Your Memory
For 16 GB of VRAM, run gpt-oss-20b: 21B total, 3.6B active, 14 GB on Ollama. That leaves about 2 GB for context on a 16 GB card, so keep the context window modest.
For a 24 GB GPU, run Qwen3-Coder-30B-A3B (19 GB, 256K context, tuned for code) or GLM-4.7-Flash (19 GB, MIT license). Both are 30B-A3B MoE models with 3–3.3B active parameters.
For a 32 GB GPU, run Qwen3.6-35B-A3B (about 24 GB, 256K context, Apache 2.0); on a Mac, plan for 48 GB of unified memory, because macOS keeps about 8 GB. It is tight on a 24 GB GPU, where part of the model spills into system RAM and speed drops.
For 64–80 GB, Qwen3-Coder-Next (80B total, 3B active, 52 GB at Q4_K_M) suits a 64 GB machine, and gpt-oss-120b (117B total, 5.1B active, 65 GB) targets a single 80 GB GPU according to OpenAI's model card.
Below 16 GB, MoE stops being practical; see the best 14B models for coding for dense alternatives.
Run MoE Models with Ollama
Each model in the table is one command: ollama run gpt-oss:20b, ollama run qwen3-coder:30b, ollama run glm-4.7-flash, ollama run qwen3.6:35b, ollama run qwen3-coder-next and ollama run gpt-oss:120b.
Ollama splits layers between GPU and system RAM when a model exceeds VRAM. In llama.cpp you can steer this for MoE models: the --cpu-moe and --n-cpu-moe flags keep expert weights in system RAM while attention stays on the GPU, so a 19–24 GB model can run on a 16 GB card at lower speed. PromptQuorum has not measured the speed.
A common mistake is judging fit by active parameters: a "3B active" model is not a 3B-size download. Check the file size on the model's Ollama page before pulling it.
For dense alternatives at every VRAM tier, see the best local LLMs for coding guide.
Related Guides
- ▸Best 14B Models for Coding -- dense coding models for 10–16 GB
- ▸Best Local LLMs for Coding -- coding models by VRAM tier
- ▸Continue.dev Acquired by Cursor: Shutdown and Alternatives -- coding tool comparison
Sources
- ▸Qwen3.6-35B-A3B model card — architecture, experts, license and SWE-bench Verified score.
- ▸Qwen3-Coder-Next model card — 80B total, 3B active, SWE-bench Verified score.
- ▸GLM-4.7-Flash model card — 30B-A3B MoE, MIT license, SWE-bench Verified score.
- ▸gpt-oss-120b model card — total and active parameters and memory targets for gpt-oss-120b and gpt-oss-20b.
- ▸Ollama library: qwen3-coder — tags and download sizes; see also gpt-oss, glm-4.7-flash, qwen3.6 and qwen3-coder-next.
Quick Answers About MoE Models for Coding
What is a MoE model and why does it matter for local coding?▾
Which MoE model is best for 16 GB of VRAM?▾
What is the best small MoE model?▾
Does a MoE model need less VRAM than a dense model?▾
Which MoE coding models are on Ollama?▾
qwen3.6:35b, qwen3-coder:30b, glm-4.7-flash, gpt-oss:20b, qwen3-coder-next and gpt-oss:120b, with download sizes of about 24, 19, 19, 14, 52 and 65 GB.Is a MoE model better than a dense model for coding?▾
qwen3.6:27b (18–19 GB), can be slower per token, so test both on your own repositories before choosing.Why does this page no longer feature Mixtral 8x22B or DeepSeek-V2?▾
Want the full breakdown?
Read the complete guide →Related Prompt Bites