Skip to main content
Watch: I Built an AI App Without Leaving Databricks

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 memory

Downloads

The official weights and every quantization listed for this model, with file sizes from Hugging Face.

GLM-4.7 downloads and file sizes
DownloadFormatSizeRepo
Official weightsBF16716.7 GBzai-org/GLM-4.7
Q4_K_MGGUF216.5 GBunsloth/GLM-4.7-GGUF
Q8_0GGUF381.0 GBunsloth/GLM-4.7-GGUF
4bitSmallest listedMLX198.6 GBmlx-community/GLM-4.7-4bit
FP8FP8362.1 GBzai-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

Terminal
pip install -U vllm --pre --index-url https://pypi.org/simple --extra-index-url https://wheels.vllm.ai/nightly

Source: huggingface.co/zai-org/GLM-4.7

vLLM

Terminal
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-fp8

Source: huggingface.co/zai-org/GLM-4.7

SGLang

Terminal
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 8000

Source: huggingface.co/zai-org/GLM-4.7

Not sure which runtime to use? Compare local LLM runtimes by platform, API and features.

License

License
MITmit
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).

API pricing and specsHosted prices per 1M tokens for GLM-4.7, if you would rather not run it yourself.

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.

Newsletter

New open weights, every week

One email per week. New model releases, open-weight drops and what they mean for what you build.