How much VRAM does GLM-5.1 754B (MoE) need at Q4_K_M? Zhipu 200K frontier

By TechCompare · Updated · How we check

Self-hosting GLM-5.1 in resident mode needs about 531 GB. That takes at least 7 datacenter cards of 80 GB with NVLink, or 4 H200 cards of 141 GB. For typical applications, the official API is usually the cheaper starting point.

Calculator

Estimated VRAM required

531 GB

754B params at Q4_K_M, 200,000 token context, batch 1, inference.

Weights
460 GB
KV cache
22.0 GB
Overhead
48.2 GB

Estimate accuracy: Weights within ~3% of most GGUF files from Q4_K_M up, ~7% for Q3_K_M and Q2_K. KV cache within ~5% for standard GQA models, ~10% for MLA or hybrid state estimates. Real VRAM may vary with framework (vLLM vs llama.cpp vs Transformers), Flash Attention, and driver overhead.

Hardware that fits

Unified memory machines show a model budget, not their installed memory. We hold back 8 GB for the system, or use the vendor's GPU limit when that's lower. It's a planning estimate, not a hard limit.

No single card or machine in our catalog has enough memory. The multi-GPU setups below do.

Multi-GPU setups

8× RTX PRO 5000 72GB
Pro · 67.2 GB per card
576 GB
94% used
2× NVIDIA B300
Datacenter · 266 GB per card
576 GB
93% used

Pooled cards show up once a model outgrows the biggest single card of that kind. Each card past the first keeps about 1 GB for its own buffers, and that's counted here. Your inference engine has to support the split, and speed also depends on how the cards connect.

Just barely too small

Apple M5 Ultra 512GB
Unified
~504 GB
short by 26.1 GB

GLM-5.1 754B at Q4_K_M with native 200K context needs about 531 GB of VRAM with all experts resident in GPU memory. That's the baseline you'll size production cluster deployments against. This giant Mixture of Experts from Zhipu activates 40B parameters per token from its 754B total parameter pool.

That doesn't shrink what has to stay loaded, because different tokens pick different experts.

How this is calculated

Zhipu built GLM-5.1 with 78 layers and hidden size 6144. Each layer stores a compressed latent instead of full keys and values. The 754B parameter pool at Q4_K_M requires 460 GB of weights regardless of routing. At the maximum native context window of 200K tokens, the FP16 key-value cache uses 22 GB of memory. Standard activation and software overhead scale with model size, adding about 49 GB. You'll need high-bandwidth hardware to run this MoE at acceptable speeds.

Verdict

The FP16 KV cache at the 200K native context holds 704 values per token in each of the 78 layers: a 512 value MLA latent, a 64 value rope key and a 128 value index key for sparse attention. The 40B active count doesn't shrink the 531 GB resident total, because any token can route to any expert.

Capping context is the lever you control: at 64K the cache falls to about 8 GB. The full 200K resident case is for serious infrastructure budgets and rarely beats the hosted API on cost.

More GLM scenarios

Kimi K3.1 Pro at Q4_K_M
A 2.78T expert pool with 24 latent attention layers and fixed state in the other 69.
View details
Mistral Large 4 at Q4_K_M
A 1T expert pool with 63 latent cache owners and 44 layers that also store an index key.
View details
Muse Spark Open at Q4_K_M
Only 16 of its 62 layers grow with context, and the other 46 hold a 2,048 token window.
View details

Frequently asked questions

What hardware is best to run GLM-5.1 in full resident mode?
You'll need a cluster of 7 GPU cards with at least 80 GB of memory each, such as H100 or A100. Linking them with NVLink is required to handle expert routing communication without bottlenecks. 4 H200 cards of 141 GB also provide enough memory.
Can I run this model on consumer hardware?
Not in any practical way. The Q4 weights alone are 460 GB, far beyond consumer cards. Moving expert weights to system RAM cuts VRAM, but the host then has to hold most of those weights and every token gets slower.
Can I run GLM-5.1 754B on consumer hardware?
Not in resident mode. The 460 GB Q4 weight footprint plus KV cache easily exceeds any single GPU or consumer workstation. Moving expert weights to system RAM trades that VRAM for a lot of host memory and slower tokens.
What does expert offload feel like in practice?
Every token gets slower. llama.cpp's --cpu-moe keeps all expert weights in system RAM, and --n-cpu-moe N does that for the first N layers. How much slower depends on how many layers you offload and how fast your system RAM is.