GLM 5.1
753.9B total, 51.7B active · 198k context · MIT · released 2026-04-03
agenticcodingreasoningchat
In short
GLM 5.1 is an open model from Z.ai with 753.9B parameters (51.7B active per token). At MXFP4, GLM 5.1 needs about 421 GB of memory at 8k context and 424 GB at 32k, counting the weights, the KV cache and runtime buffers. Nothing we price in the US runs GLM 5.1 fully in memory at 32k context at a usable speed; see the table for what comes closest.
Updated . Speeds are estimates; how they are worked out.
What to run it on in the US
Fully in memory at 32k context, priced at retailers today.
Nothing we price holds this model fully in memory.
All hardware that runs it
Everything we price, best value first. Two cards split the model by layers.
Nothing we price can run it at this context.
Memory needed
Weights, KV cache and runtime buffers at each context length (KV cache at fp16).
| Quant | File | @8k | @32k | @64k | @128k |
|---|---|---|---|---|---|
| MXFP4gguf | 419.9 GB | 421.4 GB | 423.6 GB | 426.5 GB | 432.4 GB |
| UD-Q4_K_Mgguf | 432.6 GB | 434.0 GB | 436.2 GB | 439.2 GB | 445.0 GB |
| UD-Q5_K_Mgguf | 520.1 GB | 521.5 GB | 523.7 GB | 526.7 GB | 532.5 GB |
| UD-Q6_Kgguf | 578.7 GB | 580.1 GB | 582.3 GB | 585.2 GB | 591.1 GB |
| Q8_0gguf | 746.3 GB | 747.7 GB | 749.9 GB | 752.9 GB | 758.7 GB |
Run it
Copy a command for the runtime you use.
- MXFP4
- Ollama
ollama run hf.co/unsloth/GLM-5.1-GGUF:MXFP4 - LM Studio
lms get unsloth/GLM-5.1-GGUF@mxfp4 - llama.cpp
llama-server -hf unsloth/GLM-5.1-GGUF:MXFP4
- Ollama
- UD-Q4_K_M
- Ollama
ollama run hf.co/unsloth/GLM-5.1-GGUF:UD-Q4_K_M - LM Studio
lms get unsloth/GLM-5.1-GGUF@ud-q4_k_m - llama.cpp
llama-server -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
- Ollama
- UD-Q5_K_M
- Ollama
ollama run hf.co/unsloth/GLM-5.1-GGUF:UD-Q5_K_M - LM Studio
lms get unsloth/GLM-5.1-GGUF@ud-q5_k_m - llama.cpp
llama-server -hf unsloth/GLM-5.1-GGUF:UD-Q5_K_M
- Ollama
- UD-Q6_K
- Ollama
ollama run hf.co/unsloth/GLM-5.1-GGUF:UD-Q6_K - LM Studio
lms get unsloth/GLM-5.1-GGUF@ud-q6_k - llama.cpp
llama-server -hf unsloth/GLM-5.1-GGUF:UD-Q6_K
- Ollama
- Q8_0
- Ollama
ollama run hf.co/unsloth/GLM-5.1-GGUF:Q8_0 - LM Studio
lms get unsloth/GLM-5.1-GGUF@q8_0 - llama.cpp
llama-server -hf unsloth/GLM-5.1-GGUF:Q8_0
- Ollama
Notes
Local serving requires SGLang v0.5.10+, vLLM v0.19.0+, xLLM v0.8.0+, or KTransformers v0.5.3+. Positioned as a flagship model for long-horizon agentic engineering; the card does not state a context length. Sparse or compressed attention: KV read per token is estimated as full attention.
Questions
- How much VRAM does GLM 5.1 need?
- At MXFP4, GLM 5.1 needs about 421 GB of memory at 8k context and 424 GB at 32k, counting the weights, the KV cache and runtime buffers.
- Can I run GLM 5.1 on a 16 GB GPU?
- No: it does not fit in 16 GB at 32k context, even with system RAM.
- Can I run GLM 5.1 on a 24 GB GPU?
- No: it does not fit in 24 GB at 32k context, even with system RAM.
- How do I run GLM 5.1 locally?
- With Ollama: ollama run hf.co/unsloth/GLM-5.1-GGUF:MXFP4 (the MXFP4 build). LM Studio and llama.cpp commands are on this page.
- What licence is GLM 5.1 released under?
- MIT, which allows commercial use.