GLM 4.7
GLM-4.7 is a text-generation model from zai-org released under the MIT license, supporting English and Chinese. It is intended as a coding partner, with claimed improvements over GLM-4.6 in agentic coding, terminal-based tasks, UI quality, tool use, and complex reasoning, as well as in chat, creative writing, and role-play. Model weights are provided in safetensors format.
At a glance
- Parameters
- 358.34B
- Architecture
- glm4_moe
- Context length
- 202,752
- License
- mit
- Disk space
- 657.1 GB
- Software
- vLLM, Transformers, vLLM
Will it run on your machine?
Save your machine to see a personalized rating and its reasoning.
Add my hardwareBest for
- Multilingual agentic coding
- Terminal-based tasks
- UI and webpage generation
- Tool using and web browsing tasks
- Mathematical and reasoning tasks
Tradeoffs
- Source data only provides benchmark results; no independent verification is included.
- No explicit limitations, biases, or failure modes are documented in the source.
- Hardware requirements and compatibility are not specified.
- The license is MIT, but no further licensing details or restrictions are provided.
- Claims of improvement are relative to earlier models and may not generalize to all scenarios.
Ways to run it
vLLM · Linux
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
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-fp8Transformers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_PATH = "zai-org/GLM-4.7"
messages = [{"role": "user", "content": "hello"}]
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
)
model = AutoModelForCausalLM.from_pretrained(
pretrained_model_name_or_path=MODEL_PATH,
torch_dtype=torch.bfloat16,
device_map="auto",
)
inputs = inputs.to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=128, do_sample=False)
output_text = tokenizer.decode(generated_ids[0][inputs.input_ids.shape[1] :])
print(output_text)vLLM · Linux
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
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-fp8Explore its uses
Keep exploring
Bonsai 2 · 27B
A compressed 27B-class reasoning model with publisher-provided GGUF packs and a dedicated llama.cpp fork for CUDA, Metal, and CPU.
DeepSeek V4.1 Flash
A multimodal reasoning model with a compressed key-value cache, published as open weights.
Qwen3.8
Explore 4 versions of Qwen3.8. Compare model sizes, packages, hardware requirements, and available setups.