How to Deploy GLM 4.7 Flash Locally
GLM 4.7 Flash is a 30B MoE that Zhipu released in January 2026, and it uses only 3B parameters per token, so it runs fast. On a single 24GB card, 4-bit runs at about 135 tokens/s with context up to about 115K. Zhipu positions it as a lightweight option for 30B-class deployment, and it is MIT licensed. On a 16GB card, you either drop to 2-bit or move some of the experts into system RAM.
GLM 4.7 Flash details
- Min VRAM at 4-bit20 GB · 8K
- Parameters30B
- Active params3B
- Max context198K
- Architecture
- MoE
- Experts offloaded
- 4 GB VRAM + 18 GB RAM
- License
- MIT
- Launch date
- Jan 19, 2026
- Vendor
- Z.ai / Zhipu AI
- Hugging Face repo
- zai-org/GLM-4.7-Flash
- GGUF repo
- unsloth/GLM-4.7-Flash-GGUF
- NVFP4 repo (Blackwell)
- unsloth/GLM-4.7-Flash-NVFP4
- MLX repo (Apple)
- mlx-community/GLM-4.7-Flash-4bit
- Ollama tag
- glm-4.7-flash
- Layers
- 47
- Hidden size
- 2,048
- KV heads
- 20
- Head dim
- 256
How much VRAM does GLM 4.7 Flash need for local deployment?
| Quantization | WeightsGB | 8K contextGB | 32K contextGB | 128K contextGB | 198K context (max)GB |
|---|---|---|---|---|---|
| 1-bit | 9.8GGUF | 11.3 | 12.6 | 18 | 21.9 |
| 2-bit | 11.9GGUF | 13.4 | 14.7 | 20.1 | 24 |
| 3-bit | 13.8GGUF | 15.3 | 16.6 | 22 | 25.9 |
| 4-bit | 18.3GGUF | 19.8 | 21.1 | 26.5 | 30.4 |
| 5-bit | 21.4GGUF | 22.9 | 24.2 | 29.6 | 33.5 |
| 8-bit | 31.8GGUF | 33.3 | 34.6 | 40 | 43.9 |
| BF16/FP16 | 59.9GGUF | 61.4 | 62.7 | 68.1 | 72 |
Full calculation rules are on the Methodology page.
Can a single GPU run GLM 4.7 Flash?
Easily, and a 24GB card is the sweet spot. 4-bit with 8K of context is about 20 GB, so the RTX 3090, RTX 4090 and RX 7900 XTX all take it, and because each token touches only 3B parameters it flies along at roughly 130 tokens/s with room for about 115K of context. It stores context very compactly, so a longer window adds little memory, and a 32GB RTX 5090 can open the full window. 16GB cards can't hold 4-bit and have to drop to 2-bit or 3-bit. Speed stays high, but context gets shorter, and Unsloth recommends not going below 4-bit if you can avoid it.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $37024 listings | 148.4 | 75K | |
| $86958 listings | 113.7 | 75K | |
| $89518 listings | 148.4 | 198K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 151.2 | 198K |
| $1,799107 listings | 150.1 | 198K | |
| $3,75868 listings | 153.4 | 198K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 84.2 | 198K |
| $4,89916 listings | 141 | 198K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 161.5 | 198K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 130.1 | 198K |
| $8,24022 listings | 87.5 | 198K | |
| $8,395123 listings | 174.7 | 198K | |
| $22,50011 listings | 174.7 | 198K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $89518 listings | 130.4 | 198K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 133.7 | 115K |
| $1,799107 listings | 132.4 | 115K | |
| $3,75868 listings | 136.1 | 115K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 66.1 | 198K |
| $4,89916 listings | 122.3 | 198K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 145.5 | 198K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 110.5 | 198K |
| $8,24022 listings | 69.1 | 198K | |
| $8,395123 listings | 161.5 | 198K | |
| $22,50011 listings | 161.5 | 198K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $89518 listings | 103.9 | 26K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 45.4 | 198K |
| $4,89916 listings | 95.5 | 198K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 120.4 | 198K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 83.9 | 198K |
| $8,24022 listings | 47.8 | 198K | |
| $8,395123 listings | 139.4 | 26K | |
| $22,50011 listings | 139.4 | 198K |
Only common GPUs and systems are listed, one set for models under 50B and another for larger ones, sorted by price from low to high.
What PC or server build do you need to run GLM 4.7 Flash locally?
To run 4-bit on a 16GB card, move some of the experts into system RAM. The table below pairs it with a 16GB Tesla V100: about 37 of the 47 layers of experts stay in VRAM and only 10 go to RAM, so speed doesn't drop much, at about 74 tokens/s on a DDR4 desktop and about 94 on DDR5. 8-bit works the same way, at about 27 tokens/s on a DDR4 desktop and about 76 on an 8-channel DDR4 server with an RTX 3090.
GeForce RTX 5070 + Desktop DDR5
Home PCGeForce RTX 5070 + Desktop DDR5
Home PCGeForce RTX 3090 + Single EPYC DDR4
Best valueDetailed calculation rules are on the Methodology page.
As an eBay Partner, VRAMGlass may be compensated if you buy through the eBay links on this page. The price you pay stays the same.
What to know before running GLM 4.7 Flash locally
Which quantization to pick
On a 24GB card, use 4-bit (about 18 GB); 5-bit, at about 21 GB, also fits, but with a good chunk less context. On a 16GB card, use 2-bit or 3-bit (about 12 GB and 14 GB). Unsloth recommends at least 4-bit.
Official sampling parameters
For general tasks,
temperature1.0 andtop_p0.95; for coding and terminal tasks,temperature0.7 andtop_p1.0. Turn the repetition penalty off (set it to 1.0). In llama.cpp, also setmin_pto 0.01, since its default of 0.05 is on the high side.Re-download GGUFs from before late January
On January 21, 2026, llama.cpp fixed a bug where the routing function was written wrong (it should have been sigmoid, not softmax). Before the fix, the model repeated itself and output quality was poor, and Unsloth re-uploaded its GGUFs afterward. If you downloaded files before then, download them again.
Ollama and MTP
Ollama's official library has
glm-4.7-flashwith three tags:q4_K_M,q8_0andbf16. Unsloth's docs still advise against running their GGUFs in Ollama because the chat template may be incompatible, so if you use Ollama, use the official library version. llama.cpp has supported its MTP speculative decoding since August 2026 (PR #24868); the PR author tested at 8-bit and measured an average speedup of about 1.18x with a draft length of 1.Long context is light
Its attention design (MLA) compresses the context cache, so long context takes little VRAM: at 4-bit, going from 8K to 128K adds only about 7 GB, and the full 198K comes to about 30 GB in total.
Launch commands
Ollama
- Windows
- macOS
- Linux
ollama run glm-4.7-flashllama.cpp
- NVIDIA
- AMD
- Mac
- CPU
llama-server -hf unsloth/GLM-4.7-Flash-GGUF:Q4_K_M -c 8192Short on VRAM? Add --cpu-moe to keep the routed experts in system RAM (about 18 GB needed).
llama-server -hf unsloth/GLM-4.7-Flash-GGUF:Q4_K_M -c 8192 -ngl 99 \ --cpu-moe
vLLM
- Linux
- NVIDIA
- AMD
vllm serve zai-org/GLM-4.7-FlashBlackwell GPUs (RTX 50 series, RTX PRO 6000, B200) run NVFP4 weights natively, at about 30% of the original size.
vllm serve unsloth/GLM-4.7-Flash-NVFP4MLX
- Apple Silicon
On a Mac, pip install mlx-lm first; this command downloads the MLX weights from Hugging Face and starts an OpenAI-compatible server.
mlx_lm.server --model mlx-community/GLM-4.7-Flash-4bitFile names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
Other models in the GLM family
| Model | Total params | Active params | 4-bit size |
|---|---|---|---|
| 106B | 12B | 73 GB | |
| 320B | 18B | 199.7 GB | |
| 744B | 40B | 465.8 GB | |
| 744B | 40B | 467.3 GB |