Mixture-of-Experts (MoE) VRAM vs. Speed Calculator
See why Mixture-of-Experts (MoE) models require VRAM for all total weights while streaming tokens at the speed of their active parameters.
Input Parameters
Calculated Output
Primary Result
—
Adjust inputs to recalculate immediately.
MoE Capacity vs. Speed Scaling (Q4_K_M @ 1,008 GB/s)
Every expert must remain resident in memory, even though only top-k experts are read per generated token.
| Architecture Class | Total / Active | VRAM Needed (Q4_K_M) | Active Read / Tok | Est. Single-Stream Speed |
|---|---|---|---|---|
| 30B / 3B Active MoE | 30B / 3B | ~20.9 GiB | 1.7 GiB | ~428 tok/s (if GPU fit) |
| Mixtral 8x7B (47B / 13B) | 47B / 13B | ~30.5 GiB | 7.3 GiB | ~99 tok/s (on 48GB GPU) |
| 235B / 22B Active MoE | 235B / 22B | ~141.7 GiB | 12.4 GiB | ~46 tok/s (on 800 GB/s Mac/Cluster) |
Formula & Engineering Methodology
Router networks select a sparse subset of expert FFN blocks per token, so single-stream bandwidth cost scales with active_weights_gib. However, because tokens can route to any expert unpredictably, 100% of total_params_b must stay loaded in VRAM/unified memory.
vram_required_gib = ((total_params_b * 1e9 * quant_bpw / 8) / 1073741824) + kv_overhead_gib
active_weights_gib = (active_params_b * 1e9 * quant_bpw / 8) / 1073741824
est_tps = (gpu_bw_gbs * 0.72) / active_weights_gib
Variable Definitions
total_params_b: Full model parameter footprint determining static VRAM requirement.active_params_b: Parameters actually touched per token determining memory bandwidth read time.
Practical Note: Under high concurrent batch sizes, different requests activate different experts simultaneously, causing active memory reads to converge toward total weights.
Frequently Asked Questions
Why must all experts stay in VRAM if only 2 of 8 experts run per token?
Because router gates decide which experts activate dynamically on every token, streaming cold experts over PCIe/NVMe would drop generation below 1 tok/s.
Why do MoE models shine on high-RAM Apple Silicon or EPYC CPU/GPU hybrid rigs?
You can store cold/sparse FFN experts in fast system RAM while keeping shared attention and KV cache on GPU VRAM, getting ~15–40 tok/s on massive 100B–671B models.
Does active-parameter scaling hold true during multi-user batching?
Only partially. At batch=1, only active experts are read from VRAM; at high concurrency (e.g., batch=32), different requests hit different experts, so total bandwidth converges toward reading all parameters.