Z.ai - Mixture of experts - verified
Run GLM-4.7 locally
GLM-4.7 is a 358.3B mixture-of-experts model from Z.ai with a 203K-token context window, released under MIT (commercial use is allowed); the smallest listed download is 198.6 GB, the 4bit MLX build from mlx-community/GLM-4.7-4bit.
Official weights: zai-org/GLM-4.7
- Total params
- 358.3B
- Architecture
- Mixture of experts
- Context
- 203K
- Smallest download
- 198.6 GB
Fits in
Smallest download at most 85% of memoryDownloads
The official weights and every quantization listed for this model, with file sizes from Hugging Face.
| Download | Format | Size | Repo |
|---|---|---|---|
Official weights | BF16 | 716.7 GB | zai-org/GLM-4.7 |
Q4_K_M | GGUF | 216.5 GB | unsloth/GLM-4.7-GGUF |
Q8_0 | GGUF | 381.0 GB | unsloth/GLM-4.7-GGUF |
4bitSmallest listed | MLX | 198.6 GB | mlx-community/GLM-4.7-4bit |
FP8 | FP8 | 362.1 GB | zai-org/GLM-4.7-FP8 |
GB is decimal: 1 GB = 10^9 bytes. Add memory for the context and the operating system on top of the file size.
Run it
Copied verbatim from the page linked under each command. Server commands from model cards often assume a multi-GPU node; check the flags before you run them.
vLLM
pip install -U vllm --pre --index-url https://pypi.org/simple --extra-index-url https://wheels.vllm.ai/nightlySource: huggingface.co/zai-org/GLM-4.7
vLLM
vllm serve zai-org/GLM-4.7-FP8 \
--tensor-parallel-size 4 \
--speculative-config.method mtp \
--speculative-config.num_speculative_tokens 1 \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--enable-auto-tool-choice \
--served-model-name glm-4.7-fp8Source: huggingface.co/zai-org/GLM-4.7
SGLang
python3 -m sglang.launch_server \
--model-path zai-org/GLM-4.7-FP8 \
--tp-size 8 \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--speculative-algorithm EAGLE \
--speculative-num-steps 3 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 4 \
--mem-fraction-static 0.8 \
--served-model-name glm-4.7-fp8 \
--host 0.0.0.0 \
--port 8000Source: huggingface.co/zai-org/GLM-4.7
Not sure which runtime to use? Compare local LLM runtimes by platform, API and features.
License
- License
- MIT
mit - Commercial use
- Commercial use: YesCommercial use is allowed.
- Gated download
- No. The files download directly.
Worth knowing
The card says vLLM and SGLang support GLM-4.7 only on their main or nightly builds.
Released (per the announcement).
FAQ
How big is the GLM-4.7 download?
The official BF16 weights in zai-org/GLM-4.7 are 716.7 GB. The smallest listed download is 198.6 GB, the 4bit MLX build from mlx-community/GLM-4.7-4bit. Plan for more memory than the file size: the context (KV cache) and the operating system need room too.
Can I use GLM-4.7 commercially?
GLM-4.7 is released under MIT, and commercial use is allowed. The license text is at https://huggingface.co/zai-org/GLM-4.7.
How much memory do I need for GLM-4.7?
By this directory's rule of thumb it fits in 256 GB and up: the smallest listed download, 198.6 GB, is at most 85% of 256 GB, which leaves room for the context and the operating system.
What is the context length of GLM-4.7?
202,752 tokens. A longer context needs more memory for the KV cache, so you can run with a shorter one when memory is tight.
Sources
Last verified from the pages below.
- Hugging Face model card - huggingface.co
- config.json - huggingface.co
- Z.ai announcement - z.ai
- Vendor FP8 weights - huggingface.co
- unsloth GGUF - huggingface.co
- MLX 4-bit - huggingface.co
Newsletter
New open weights, every week
One email per week. New model releases, open-weight drops and what they mean for what you build.
Keep exploring
Best local AI models
Our curated picks by hardware tier, with benchmarks and the reasoning.
Model API pricing and specs
First-party prices per 1M tokens when you would rather call an API.
AI benchmark leaderboards
Sourced scores, for when you need to compare quality.
Setup guides
Point your coding tools at the model you picked.