GLM 5
742.1B total, 40B active · 198k context · MIT · released 2026-02-11
chatcodingagenticreasoning
In short
GLM 5 is an open model from Z.ai with 742.1B parameters (40B active per token). At MXFP4, GLM 5 needs about 384 GB of memory at 8k context and 384 GB at 8k, counting the weights, the KV cache and runtime buffers. Nothing we price in the UK runs GLM 5 fully in memory at 8k 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 UK
Fully in memory at 8k context, priced at retailers today.
Something we price holds it fully in memory, but none reaches 15 tok/s, our bar for recommending it. The table below has the speeds.
All hardware that runs it
Everything we price, best value first. Two cards split the model by layers.
| Hardware | Quant | Fits | Decode | Price | tok/s per 1,000 |
|---|---|---|---|---|---|
| Mac Studio M3 Ultra 512GB | MXFP4 | fits | 14 tok/s | £17,495 | 0.8 |
40 other cards and machines we price cannot hold 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 | 382.4 GB | 383.8 GB | 386.0 GB | 388.9 GB | 394.8 GB |
| mlx-4bitmlx | 389.9 GB | 391.3 GB | 393.5 GB | 396.4 GB | 402.3 GB |
| Q4_K_Mgguf | 424.6 GB | 426.0 GB | 428.2 GB | 431.1 GB | 437.0 GB |
| Q5_K_Mgguf | 498.4 GB | 499.8 GB | 502.0 GB | 505.0 GB | 510.8 GB |
| Q6_Kgguf | 576.8 GB | 578.3 GB | 580.5 GB | 583.4 GB | 589.3 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-GGUF:MXFP4 - LM Studio
lms get unsloth/GLM-5-GGUF@mxfp4 - llama.cpp
llama-server -hf unsloth/GLM-5-GGUF:MXFP4
- Ollama
- mlx-4bit
- LM Studio
lms get mlx-community/GLM-5-4bit - MLX
mlx_lm.server --model mlx-community/GLM-5-4bit
- LM Studio
- Q4_K_M
- Ollama
ollama run hf.co/unsloth/GLM-5-GGUF:Q4_K_M - LM Studio
lms get unsloth/GLM-5-GGUF@q4_k_m - llama.cpp
llama-server -hf unsloth/GLM-5-GGUF:Q4_K_M
- Ollama
- Q5_K_M
- Ollama
ollama run hf.co/unsloth/GLM-5-GGUF:Q5_K_M - LM Studio
lms get unsloth/GLM-5-GGUF@q5_k_m - llama.cpp
llama-server -hf unsloth/GLM-5-GGUF:Q5_K_M
- Ollama
- Q6_K
- Ollama
ollama run hf.co/unsloth/GLM-5-GGUF:Q6_K - LM Studio
lms get unsloth/GLM-5-GGUF@q6_k - llama.cpp
llama-server -hf unsloth/GLM-5-GGUF:Q6_K
- Ollama
- Q8_0
- Ollama
ollama run hf.co/unsloth/GLM-5-GGUF:Q8_0 - LM Studio
lms get unsloth/GLM-5-GGUF@q8_0 - llama.cpp
llama-server -hf unsloth/GLM-5-GGUF:Q8_0
- Ollama
Notes
Local serving needs recent frameworks (vLLM v0.19.0+, SGLang v0.5.10+); examples use tensor-parallel size 8. Uses DeepSeek Sparse Attention. Sparse or compressed attention: KV read per token is estimated as full attention. Excludes 11.8B parameters of multi-token-prediction layers, which local runtimes do not load.
Questions
- How much VRAM does GLM 5 need?
- At MXFP4, GLM 5 needs about 384 GB of memory at 8k context and 384 GB at 8k, counting the weights, the KV cache and runtime buffers.
- Can I run GLM 5 on a 16 GB GPU?
- No: it does not fit in 16 GB at 8k context, even with system RAM.
- Can I run GLM 5 on a 24 GB GPU?
- No: it does not fit in 24 GB at 8k context, even with system RAM.
- How do I run GLM 5 locally?
- With Ollama: ollama run hf.co/unsloth/GLM-5-GGUF:MXFP4 (the MXFP4 build). LM Studio and llama.cpp commands are on this page.
- What licence is GLM 5 released under?
- MIT, which allows commercial use.