Run GLM 4.7 Flash Locally: VRAM & GPU Requirements
GLM 4.7 Flash, Zhipu's 30B MoE from January 2026, runs 4-bit on a single 24GB GPU at about 135 tokens/s with context up to about 115K. It uses only 3B parameters per token. Zhipu positions it as a lightweight option for 30B-class deployment under an MIT license. On a 16GB GPU, you either drop to 2-bit or offload some experts to system RAM.
GLM 4.7 Flash details
- Min VRAM at 4-bit (8K context)20 GB
- 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?
The table below assumes all experts stay in VRAM with no RAM offloading. If you are short on VRAM, you can offload experts to RAM; see the complete builds below.
| 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: a 24GB card is the sweet spot for GLM 4.7 Flash, as 4-bit with 8K context takes about 20 GB of VRAM and fits on an RTX 3090, RTX 4090 or RX 7900 XTX. Touching only 3B parameters per token, it reaches roughly 130 tokens/s with room for about 115K context, and its compact context storage lets a 32GB RTX 5090 open the full window. 16GB GPUs can't hold 4-bit and have to drop to 2-bit or 3-bit with shorter context, though Unsloth recommends staying at 4-bit or above when possible.
The table below assumes all experts stay in VRAM with no RAM offloading. If you are short on VRAM, you can offload experts to RAM; see the complete builds below.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $41316 listings | 148.4 | 75K | |
| $88045 listings | 113.7 | 75K | |
| $1,37813 listings | 148.4 | 198K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 151.2 | 198K |
| $1,992116 listings | 150.1 | 198K | |
| $3,82574 listings | 153.4 | 198K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 84.2 | 198K |
| $4,89925 listings | 141 | 198K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 161.5 | 198K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 130.1 | 198K |
| $7,385128 listings | 174.7 | 198K | |
| $7,90037 listings | 87.5 | 198K | |
| $18,60020 listings | 174.7 | 198K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $1,37813 listings | 130.4 | 198K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 133.7 | 115K |
| $1,992116 listings | 132.4 | 115K | |
| $3,82574 listings | 136.1 | 115K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 66.1 | 198K |
| $4,89925 listings | 122.3 | 198K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 145.5 | 198K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 110.5 | 198K |
| $7,385128 listings | 161.5 | 198K | |
| $7,90037 listings | 69.1 | 198K | |
| $18,60020 listings | 161.5 | 198K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $1,37813 listings | 103.9 | 26K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 45.4 | 198K |
| $4,89925 listings | 95.5 | 198K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 120.4 | 198K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 83.9 | 198K |
| $7,385128 listings | 139.4 | 26K | |
| $7,90037 listings | 47.8 | 198K | |
| $18,60020 listings | 139.4 | 198K |
Only common GPUs and systems are listed, from cheapest to most expensive.
What PC or server build do you need to run GLM 4.7 Flash locally?
To run GLM 4.7 Flash at 4-bit on a 16GB GPU, offload some of the experts to system RAM. Paired with a 16GB Tesla V100, about 37 of the 47 layers of experts stay in VRAM and only 10 move to RAM, so speed stays high at about 74 tokens/s on a DDR4 desktop and about 94 on DDR5. 8-bit works the same way via RAM offload, 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 |