Instructions to use zai-org/GLM-5.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-5.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-5.2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-5.2") model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-5.2") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zai-org/GLM-5.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zai-org/GLM-5.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-5.2
- SGLang
How to use zai-org/GLM-5.2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zai-org/GLM-5.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "zai-org/GLM-5.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-5.2 with Docker Model Runner:
docker model run hf.co/zai-org/GLM-5.2
Deep admiration for your workβAny plans for a 30B-level GLM 5.2 Flash model for local edge execution?
#26 opened about 11 hours ago
by
edwardyoon79
what is the purpose of this model
1
#25 opened 1 day ago
by
redosempiternal66
Add ResearchClawBench evaluation result
#22 opened 4 days ago
by
black-yt
How to enable Turn-Level Thinking?
#21 opened 4 days ago
by
g-a-b-y
glm-5.2-RedlineBench
π₯ 1
2
#19 opened 5 days ago
by
juhipandit
How much VRAM is needed to keep it running?
1
#18 opened 6 days ago
by
cqy
GLM 5.2 Nano ( 4 to 20 B params) would be good for edge hardware
5
#16 opened 7 days ago
by
wop
GLM-5.2-Flash 20B -40B would be amazing.
π₯ 23
6
#15 opened 7 days ago
by
UniversalLove333
Is AIME 2026 Benchmark evaluated with Tool Call enabled?
π 1
2
#14 opened 9 days ago
by
ghostplant
Multilingual or just English and Chinese
#13 opened 9 days ago
by
Duonglv
How to reproduce the GLM-5.2 benchmarks across various datasets?
#11 opened 10 days ago
by
tuo02
crash
π 6
4
#9 opened 10 days ago
by
dpe1
Updating README.md ..
#8 opened 11 days ago
by
usermma
Please FUCK Anthropic
β€οΈπ 122
18
#6 opened 11 days ago
by
6cf
vision model
π 1
2
#5 opened 11 days ago
by
DUOWEN
This model feels good.
π 20
2
#4 opened 11 days ago
by
Civanerim
We need some Air or at least some Flash
β€οΈ 173
41
#3 opened 11 days ago
by
jacek2024
Air or Flash model coming?
ππ 61
2
#2 opened 11 days ago
by
sbeltz
Question regarding reasoning effort in chat template
π 6
1
#1 opened 11 days ago
by
mcfadyeni