Skip to main content
PromptQuorumBuilt for humans. Structured for AI.

Best MoE Models for Local Coding?

By · 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
Best MoE Models for Local Coding?

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
Model ComparisonsAdvanced

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.

ModelTotal / activeOllama sizeMemory tier
Qwen3.6-35B-A3B35B / 3B~24 GB32 GB
Qwen3-Coder-30B-A3B30B / 3.3B19 GB24 GB
GLM-4.7-Flash30B / 3B19 GB24 GB
gpt-oss-20b21B / 3.6B14 GB16 GB
Qwen3-Coder-Next80B / 3B52 GB64 GB
gpt-oss-120b117B / 5.1B65 GB80 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

Sources

Quick Answers About MoE Models for Coding

What is a MoE model and why does it matter for local coding?▾
MoE stands for Mixture of Experts. The model contains many expert sub-networks but activates only a few per token, so generation speed matches a much smaller dense model while the full parameter count supplies broad knowledge across languages and frameworks.
Which MoE model is best for 16 GB of VRAM?▾
gpt-oss-20b. It has 21B total and 3.6B active parameters, downloads at 14 GB on Ollama and is released under Apache 2.0. The 19 GB models (Qwen3-Coder-30B-A3B, GLM-4.7-Flash) need a 24 GB GPU or CPU offload.
What is the best small MoE model?▾
By active parameters, GLM-4.7-Flash (3B), Qwen3-Coder-30B-A3B (3.3B) and gpt-oss-20b (3.6B) are the smallest here. By memory, gpt-oss-20b is smallest at 14 GB; the other two are 19 GB.
Does a MoE model need less VRAM than a dense model?▾
No. All experts must be loaded, so memory follows total parameters. The benefit is speed: only the active parameters are computed for each token.
Which MoE coding models are on Ollama?▾
Ollama lists 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?▾
Not automatically. MoE trades memory for speed. A dense model with a similar file size, such as 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?▾
Both are 2024 models that newer MoE releases have replaced for local coding. An earlier version of this page also gave wrong memory figures: Mixtral 8x22B has 141B total parameters (46.7B belongs to Mixtral 8x7B), and DeepSeek-V2 has 236B total parameters, far more than 16 GB can hold.
MCP