Z.ai · released 2026-01-19
GLM-4.7 Flash
30B MoE with about 3B active parameters and MLA attention, popular for local coding and agents on 24-32 GB machines.
- Parameters
- 31B
- Active / token
- 3B
- Context
- 198K
- Memory at Q4
- 20.5 GB
- License
- mit
- Images
- No
- Thinking mode
- Yes
Cheapest ways to use it Free in / Free out per 1M tokens via Z.ai (3 providers) · or free on RTX 3090 or better
Official size: 30B-A3B MoE. We size memory from the actual files on Hugging Face.
Get started
1 · Try it now
Use via API from Free/1M on Z.aiFree online chats are the quickest way to see if a model suits you before downloading anything.
2 · Download the files
You’ll need about 20.5 GB of memory at 4-bit. Check your machine →
3 · Run it on your machine
For a Linux GPU server, serving an OpenAI-compatible API:
vllm serve zai-org/GLM-4.7-FlashWill it run on my computer?
GLM-4.7 Flash needs roughly 20.5 GB of GPU memory at the usual Q4 quality, but only 3B parameters are used per token, so it runs faster than its size suggests and copes better with spilling into system RAM. Check your exact machine →
| Machine | Best file | Fit | Est. speed |
|---|---|---|---|
| RTX 4060 | Q4_K_M | Spills to RAM | ~23 tok/s · Usable |
| RTX 3060 12GB | Q4_K_M | Spills to RAM | ~30 tok/s · Fast |
| RTX 4060 Ti 16GB | Q4_K_M | Spills to RAM | ~39 tok/s · Fast |
| RTX 3090 | Q4_K_M | Fits in memory | ~151 tok/s · Very fast |
| RTX 4090 | Q4_K_M | Fits in memory | ~157 tok/s · Very fast |
| RTX 5090 | Q5_K_M | Fits in memory | ~193 tok/s · Very fast |
| M4 · 16 GB | — | Too big | — |
| M4 Pro · 48 GB | Q5_K_M | Fits in memory | ~51 tok/s · Fast |
| M4 Max · 128 GB | Q5_K_M | Fits in memory | ~88 tok/s · Very fast |
| M3 Ultra · 512 GB | Q5_K_M | Fits in memory | ~117 tok/s · Very fast |
| DGX Spark | Q5_K_M | Fits in memory | ~57 tok/s · Fast |
| Ryzen AI Max+ 395 | Q5_K_M | Fits in memory | ~45 tok/s · Fast |
PCs assume 64 GB system RAM. Estimates, not measurements — method.
Ways to run it
Use it through an API 3 providers
| Provider | Input / 1M | Output / 1M | Stated precision | Context | |
|---|---|---|---|---|---|
| Z.ai | Free Free cached | Free | not stated | — | source ↗ |
| Cloudflare Workers AI | $0.06 | $0.40 | not stated | — | source ↗ |
| Amazon Bedrock | $0.07 | $0.40 | not stated | — | source ↗ |
Prices in USD from each provider’s own pricing page, checked 2026-12-04. Cheapest highlighted.
Rent a GPU and run it yourself
| Setup | From | Per hour | File | Est. speed | Per 1M tokens* |
|---|---|---|---|---|---|
| 1× RTX A5000 24GB | RunPod community | $0.16 | 4-bit 20.5 GB | ~135 tok/s | $0.33 |
| 1× RTX 3090 24GB | Vast.ai marketplace | $0.21 | 4-bit 20.5 GB | ~151 tok/s | $0.39 |
| 1× RTX 3090 Ti 24GB | Vast.ai marketplace | $0.27 | 4-bit 20.5 GB | ~157 tok/s | $0.48 |
| 1× L4 24GB | Vast.ai marketplace | $0.32 | 4-bit 20.5 GB | ~70 tok/s | $1.27 |
*For one conversation at a time. Serving many users at once (batching, e.g. with vLLM) cuts the cost per token by 10× or more, which is how API providers get so cheap. Rental prices checked 2026-12-04. All GPU prices →
On your own machine
Free after the hardware. See the table above for which GPUs and Macs can run it, or check your exact machine. Easiest apps: Ollama and LM Studio.
Memory by quality level
| File | Quality | Weights | + 8K context | Total |
|---|---|---|---|---|
| Q3_K_M | Noticeably worse | 15.2 GB | 0.4 GB | 16.7 GB |
| Q4_K_M | Good — the usual pick | 18.9 GB | 0.4 GB | 20.5 GB |
| Q5_K_M | Very close to full | 22.2 GB | 0.4 GB | 23.9 GB |
| Q6_K | Near lossless | 25.7 GB | 0.4 GB | 27.6 GB |
| Q8_0 | Practically lossless | 33.1 GB | 0.4 GB | 35.2 GB |
| FP16 | Full precision | 62.4 GB | 0.4 GB | 65.3 GB |
Test answers
GLM-4.7 Flash is queued for our test suite. See tested models →