Views
No views yet

| Model | Download Links | Model Size | Precision |
|---|---|---|---|
| GLM-4.5 | 🤗 Hugging Face 🤖 ModelScope | 355B-A32B | BF16 |
| GLM-4.5-Air | 🤗 Hugging Face 🤖 ModelScope | 106B-A12B | BF16 |
| GLM-4.5-FP8 | 🤗 Hugging Face 🤖 ModelScope | 355B-A32B | FP8 |
| GLM-4.5-Air-FP8 | 🤗 Hugging Face 🤖 ModelScope | 106B-A12B | FP8 |
| GLM-4.5-Base | 🤗 Hugging Face 🤖 ModelScope | 355B-A32B | BF16 |
| GLM-4.5-Air-Base | 🤗 Hugging Face 🤖 ModelScope | 106B-A12B | BF16 |
--speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 to ensure competitive
inference speed.cpu-offload parameter is not used.8.1T to ensure normal model loading and operation.| Model | Precision | GPU Type and Count | Test Framework |
|---|---|---|---|
| GLM-4.5 | BF16 | H100 x 16 / H200 x 8 | sglang |
| GLM-4.5 | FP8 | H100 x 8 / H200 x 4 | sglang |
| GLM-4.5-Air | BF16 | H100 x 4 / H200 x 2 | sglang |
| GLM-4.5-Air | FP8 | H100 x 2 / H200 x 1 | sglang |
| Model | Precision | GPU Type and Count | Test Framework |
|---|---|---|---|
| GLM-4.5 | BF16 | H100 x 32 / H200 x 16 | sglang |
| GLM-4.5 | FP8 | H100 x 16 / H200 x 8 | sglang |
| GLM-4.5-Air | BF16 | H100 x 8 / H200 x 4 | sglang |
| GLM-4.5-Air | FP8 | H100 x 4 / H200 x 2 | sglang |
| Model | GPU Type and Count | Strategy | Batch Size (per GPU) |
|---|---|---|---|
| GLM-4.5 | H100 x 16 | Lora | 1 |
| GLM-4.5-Air | H100 x 4 | Lora | 1 |
| Model | GPU Type and Count | Strategy | Batch Size (per GPU) |
|---|---|---|---|
| GLM-4.5 | H20 (96GiB) x 16 | Lora | 1 |
| GLM-4.5-Air | H20 (96GiB) x 4 | Lora | 1 |
| GLM-4.5 | H20 (96GiB) x 128 | SFT | 1 |
| GLM-4.5-Air | H20 (96GiB) x 32 | SFT | 1 |
| GLM-4.5 | H20 (96GiB) x 128 | RL | 1 |
| GLM-4.5-Air | H20 (96GiB) x 32 | RL | 1 |
transformers library, demonstrating both thinking and non-thinking modes:1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4# Load model and tokenizer
5model_id = "zai-org/GLM-4.5-FP8"
6tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16, # Adjust as needed (e.g., torch.float8 for FP8 models)
10 low_cpu_mem_usage=True,
11 device_map="auto",
12 trust_remote_code=True
13)
14model.eval()
15
16messages = [
17 {"role": "user", "content": "Hello, how are you?"},
18]
19
20# Example for non-thinking mode (direct response)
21# The `add_nothink_token=True` parameter triggers non-thinking mode.
22# This mode is suitable for straightforward questions not requiring complex reasoning or tool usage.
23inputs_nothink_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False, add_nothink_token=True)
24input_ids_nothink = tokenizer(inputs_nothink_text, return_tensors="pt").input_ids.to(model.device)
25outputs_nothink = model.generate(input_ids_nothink, max_new_tokens=100)
26print("Non-thinking mode response:", tokenizer.decode(outputs_nothink[0][len(input_ids_nothink[0]):], skip_special_tokens=True))
27
28# Example for thinking mode (for complex reasoning or tool usage)
29# By default, `add_nothink_token=False` or omitting it triggers thinking mode.
30# This mode allows the model to perform multi-step reasoning, break down tasks, and utilize tools.
31inputs_think_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False, add_nothink_token=False)
32input_ids_think = tokenizer(inputs_think_text, return_tensors="pt").input_ids.to(model.device)
33outputs_think = model.generate(input_ids_think, max_new_tokens=100)
34print("Thinking mode response:", tokenizer.decode(outputs_think[0][len(input_ids_think[0]):], skip_special_tokens=True))1vllm serve zai-org/GLM-4.5-Air \
2 --tensor-parallel-size 8 \
3 --tool-call-parser glm45 \
4 --reasoning-parser glm45 \
5 --enable-auto-tool-choice \
6 --served-model-name glm-4.5-air--cpu-offload-gb 16 (only applicable to vLLM).flash infer issues, use VLLM_ATTENTION_BACKEND=XFORMERS as a temporary replacement. You can also
specify TORCH_CUDA_ARCH_LIST='9.0+PTX' to use flash infer (different GPUs have different TORCH_CUDA_ARCH_LIST
values, please check accordingly).1python3 -m sglang.launch_server \
2 --model-path zai-org/GLM-4.5-Air \
3 --tp-size 8 \
4 --tool-call-parser glm45 \
5 --reasoning-parser glm45 \
6 --speculative-algorithm EAGLE \
7 --speculative-num-steps 3 \
8 --speculative-eagle-topk 1 \
9 --speculative-num-draft-tokens 4 \
10 --mem-fraction-static 0.7 \
11 --served-model-name glm-4.5-air \
12 --host 0.0.0.0 \
13 --port 80001python3 -m sglang.launch_server \
2 --model-path zai-org/GLM-4.5-Air-FP8 \
3 --tp-size 4 \
4 --tool-call-parser glm45 \
5 --reasoning-parser glm45 \
6 --speculative-algorithm EAGLE \
7 --speculative-num-steps 3 \
8 --speculative-eagle-topk 1 \
9 --speculative-num-draft-tokens 4 \
10 --mem-fraction-static 0.7 \
11 --disable-shared-experts-fusion \
12 --served-model-name glm-4.5-air-fp8 \
13 --host 0.0.0.0 \
14 --port 8000vLLM and SGLang, thinking mode is enabled by default when sending requests. If you want to disable the
thinking switch, you need to add the extra_body={"chat_template_kwargs": {"enable_thinking": False}} parameter.api_request.py in the inference folder.1@article{zhu2025glm45,
2 title={GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Models},
3 author={Zhu, Xiaohan and Sun, Tianxiang and Wang, Hao and Xu, Yi and Zhang, Yichen and Wang, Junyi and Huang, Junjie and Zeng, Jiao and Huang, Yangyang and Gu, Ruipeng and Zhang, Xiaodong and Du, Mengying and Han, Hao and Li, Chao and Xiao, Jin and Guo, Weidong and Li, Zhen and Lu, Jingkang and Chen, Shu and Chen, Huadong and Chen, Peng and Liu, Hongguang and Guo, Guang and Liu, Wen and Yang, Tianyu and Hu, Bo and Zhang, Wenmin and Sun, Maosong},
4 journal={arXiv preprint arXiv:2508.06471},
5 year={2025}
6}