Mixture-of-Experts Models and VRAM
A mixture-of-experts (MoE) model needs memory for all of its parameters, but reads only the active ones for each token. gpt-oss-120b has 116.8B parameters and needs 62.0 GB, but only 5.1B are used per token, so it generates text about as fast as a 5B dense model.
Memory and speed of popular MoE models
Q4_K_M or native format with an 8K context. Speeds are single-user estimates.
| Model | Total / active | VRAM | RTX 3090 24GB | Apple M4 Max 128GB | NVIDIA DGX Spark 128GB |
|---|---|---|---|---|---|
| gpt-oss-20b | 20.9B / 3.6B | 13.9 GB | ~155 tok/s | ~107 tok/s | ~57 tok/s |
| Gemma 4 26B-A4B | 25.2B / 3.8B | 15.6 GB | ~138 tok/s | ~97 tok/s | ~53 tok/s |
| Qwen 3.6 35B-A3B | 35B / 3B | 21.0 GB | ~138 tok/s | ~105 tok/s | ~62 tok/s |
| Qwen3-Next 80B-A3B | 80B / 3B | 46.3 GB | ~32 tok/s | ~96 tok/s | ~59 tok/s |
| GLM-4.5-Air | 106B / 12B | 62.1 GB | ~7.6 tok/s | ~37 tok/s | ~19 tok/s |
| gpt-oss-120b | 116.8B / 5.1B | 62.0 GB | ~20 tok/s | ~83 tok/s | ~46 tok/s |
| Qwen 3.5 122B-A10B | 122B / 10B | 70.2 GB | ~9.1 tok/s | ~44 tok/s | ~23 tok/s |
| Mistral Small 4 119B | 119B / 6.5B | 112 GB | Does not fit | Does not fit | ~23 tok/s |
On the RTX 3090, models larger than 24 GB run with partial CPU offload, which is why their speed drops.
Why all experts must be in memory
A router picks a few experts for each token in each layer, and the next token may pick completely different ones. Loading experts from disk on demand would be far too slow, so every expert stays in memory. The "A3B" or "A10B" in a model name tells you the active parameters, not the memory you need.
Why MoE suits big-memory, lower-bandwidth hardware
Generation speed depends on bytes read per token. A dense 70B model reads about 39.9 GB per token at Q4_K_M; gpt-oss-120b reads about 2.7 GB. On a Ryzen AI Max+ 395 128GB or Mac, that is the difference between single-digit and 40+ tokens per second.
Expert offloading: big MoE on a small GPU
Because each token touches only a few experts, MoE models tolerate CPU offloading better than dense ones, especially if you put only the experts in system RAM and keep attention and shared layers on the GPU:
# llama.cpp: keep the expert tensors of the first 30 layers on the CPU
llama-server -m glm-4.5-air-Q4_K_M.gguf -ngl 99 --n-cpu-moe 30
# finer control with tensor overrides
llama-server -m model.gguf -ngl 99 -ot ".ffn_.*_exps.=CPU"With 64 GB of system RAM and a 24 GB GPU, this runs GLM-4.5-Air or gpt-oss-120b at usable speed. See CPU offloading for the general case.
Dense or MoE: which should you run?
- Plenty of memory, modest bandwidth (Mac, Strix Halo, DGX Spark): MoE.
- One fast GPU with limited VRAM: a dense model that fits, or a small-active MoE such as Qwen 3.6 35B-A3B.
- Fine-tuning: dense models are simpler and better supported.
How routing works
In a dense model, every token passes through every feed-forward block. In a mixture-of-experts model, each layer has many smaller feed-forward blocks (experts) and a small router that picks a few of them for each token. Qwen 3.6 35B-A3B has 256 experts per layer and uses 8 routed experts plus one shared expert per token. Attention layers, embeddings and shared experts are used by every token; only the routed experts vary.
Why MoE models are not as fast as their active size suggests
A model with 3B active parameters would ideally run as fast as a 3B dense model. In practice it runs slower, because the GPU launches many small expert computations per layer and the router adds work. Our speed model includes this overhead, which is why our MoE speeds are lower than a simple bandwidth calculation suggests and closer to what runtimes actually report.
Quantizing MoE models
Experts hold most of the parameters, so they dominate file size. Some quantizers keep attention and shared layers at higher precision and quantize experts more aggressively, which saves memory with little quality loss. gpt-oss-120b ships with its experts in MXFP4 and everything else in higher precision, which is why its native file is only 60.8 GB.
Memory planning for MoE on a GPU plus RAM
| Model | Total at Q4 | On a 24 GB GPU | System RAM needed |
|---|---|---|---|
| Qwen 3.6 35B-A3B | 21.0 GB | Fits fully | None |
| Qwen3-Next 80B-A3B | 46.3 GB | Attention + some experts | 32 GB+ |
| gpt-oss-120b | 62.0 GB | Attention + some experts | 48 GB+ |
| GLM-4.5-Air | 62.1 GB | Attention + some experts | 48 GB+ |
| Qwen 3.5 122B-A10B | 70.2 GB | Attention + some experts | 56 GB+ |
Add your operating system's needs on top of the RAM figure.