GLM 4.7
358.3B total, 39.2B active · 198k context · MIT · released 2025-12-22
chatcodingagenticreasoning
In short
GLM 4.7 is an open model from Z.ai with 358.3B parameters (39.2B active per token). At mlx-4bit, GLM 4.7 needs about 189 GB of memory at 8k context and 189 GB at 8k, counting the weights, the KV cache and runtime buffers. Nothing we price in the UK runs GLM 4.7 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 | Q8_0 | fits | 7 tok/s | £17,495 | 0.4 |
39 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 |
|---|---|---|---|---|---|
| mlx-4bitmlx | 184.9 GB | 188.5 GB | 197.3 GB | 209.0 GB | 232.4 GB |
| Q4_K_Mgguf | 201.6 GB | 205.2 GB | 214.0 GB | 225.7 GB | 249.0 GB |
| Q5_K_Mgguf | 236.8 GB | 240.4 GB | 249.2 GB | 260.9 GB | 284.2 GB |
| mlx-6bitmlx | 267.0 GB | 270.7 GB | 279.4 GB | 291.1 GB | 314.5 GB |
| Q6_Kgguf | 274.2 GB | 277.8 GB | 286.5 GB | 298.2 GB | 321.6 GB |
| mlx-8bitmlx | 349.2 GB | 352.8 GB | 361.6 GB | 373.2 GB | 396.6 GB |
| Q8_0gguf | 354.8 GB | 358.4 GB | 367.2 GB | 378.9 GB | 402.3 GB |
Run it
Copy a command for the runtime you use.
- mlx-4bit
- LM Studio
lms get mlx-community/GLM-4.7-4bit - MLX
mlx_lm.server --model mlx-community/GLM-4.7-4bit
- LM Studio
- Q4_K_M
- Ollama
ollama run hf.co/unsloth/GLM-4.7-GGUF:Q4_K_M - LM Studio
lms get unsloth/GLM-4.7-GGUF@q4_k_m - llama.cpp
llama-server -hf unsloth/GLM-4.7-GGUF:Q4_K_M
- Ollama
- Q5_K_M
- Ollama
ollama run hf.co/unsloth/GLM-4.7-GGUF:Q5_K_M - LM Studio
lms get unsloth/GLM-4.7-GGUF@q5_k_m - llama.cpp
llama-server -hf unsloth/GLM-4.7-GGUF:Q5_K_M
- Ollama
- mlx-6bit
- LM Studio
lms get mlx-community/GLM-4.7-6bit - MLX
mlx_lm.server --model mlx-community/GLM-4.7-6bit
- LM Studio
- Q6_K
- Ollama
ollama run hf.co/unsloth/GLM-4.7-GGUF:Q6_K - LM Studio
lms get unsloth/GLM-4.7-GGUF@q6_k - llama.cpp
llama-server -hf unsloth/GLM-4.7-GGUF:Q6_K
- Ollama
- mlx-8bit
- LM Studio
lms get mlx-community/GLM-4.7-8bit - MLX
mlx_lm.server --model mlx-community/GLM-4.7-8bit
- LM Studio
- Q8_0
- Ollama
ollama run hf.co/unsloth/GLM-4.7-GGUF:Q8_0 - LM Studio
lms get unsloth/GLM-4.7-GGUF@q8_0 - llama.cpp
llama-server -hf unsloth/GLM-4.7-GGUF:Q8_0
- Ollama
Notes
vLLM and SGLang support GLM-4.7 only on their main branches (nightly/dev images); transformers 4.57.3 is referenced. Example FP8 serving uses tensor parallel 4 (vLLM) or 8 (SGLang).
Questions
- How much VRAM does GLM 4.7 need?
- At mlx-4bit, GLM 4.7 needs about 189 GB of memory at 8k context and 189 GB at 8k, counting the weights, the KV cache and runtime buffers.
- Can I run GLM 4.7 on a 16 GB GPU?
- No: it does not fit in 16 GB at 8k context, even with system RAM.
- Can I run GLM 4.7 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 4.7 locally?
- With Ollama: ollama run hf.co/unsloth/GLM-4.7-GGUF:Q4_K_M (the Q4_K_M build). LM Studio and llama.cpp commands are on this page.
- What licence is GLM 4.7 released under?
- MIT, which allows commercial use.