Instructions to use zai-org/GLM-5.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-5.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-5.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-5.1") model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-5.1", device_map="auto") 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=256) 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.1 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.1" # 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.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-5.1
- SGLang
How to use zai-org/GLM-5.1 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.1" \ --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.1", "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.1" \ --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.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-5.1 with Docker Model Runner:
docker model run hf.co/zai-org/GLM-5.1
Commit History
-
Draft: Add SkillsBench v1.1 evaluation result
Verified signatureDraft for @bingran-you review; maintainers please do not merge yet. ## Summary Adds GLM 5.1's SkillsBench v1.1 with-skills evaluation result to Hugging Face eval results. This is a metadata-only PR adding `.eval_results/skillsbench.yaml`. It does not change model files, code, dependencies, or runtime behavior. ## Result - Benchmark: SkillsBench v1.1 - Benchmark dataset: https://huggingface.co/datasets/benchflow/skillsbench - Task id: `skillsbench_v1_1` - Value: `58.4` - Mode: with-skills - Harness: BenchFlow - Agent: OpenHands - Coverage: 87 tasks x 3 trials, full 261/261 selected trials - Recomputed date: 2026-06-11 ## Source Official export: https://huggingface.co/datasets/benchflow/skillsbench-leaderboard/raw/main/leaderboard/skillsbench/v1.1/official.json Trajectory/result archive: https://huggingface.co/datasets/benchflow/skillsbench-leaderboard ## Notes SkillsBench has paired with-skills and without-skills scores. This PR submits only the with-skills score because the c…065d888
-
Add Claw-Eval evaluation results (#33)
- Add Claw-Eval evaluation results (e4e274078daed7066164b4ed409f5e8273a3d2e7) Co-authored-by: Nathan Habib <SaylorTwift@users.noreply.huggingface.co>26e1bd6
-
update chat_template
zRzRzRzRzRzRzR442b527
-
update CyberGym score for Gemini 3.1 Pro and GPT-5.4
zRzRzRzRzRzRzRbef0214
-
Merge branch 'main' of hf.co:zai-org/GLM-5.1
zRzRzRzRzRzRzR0e12244 -
update
zRzRzRzRzRzRzR7015f16
-
Update .eval_results/swe_bench_pro.yaml (#10)
- Update .eval_results/swe_bench_pro.yaml (24746423c80e373b9611754163d868331411f764) Co-authored-by: Nathan Habib <SaylorTwift@users.noreply.huggingface.co>dd43008 -
update bench
zRzRzRzRzRzRzR146e9f2
-
add SWE-bench_Pro
zRzRzRzRzRzRzR278f446 -
GLM-5.1
zRzRzRzRzRzRzRbf3dec1 -
Update README.md
Verified signatureada0c51
-
Add files using upload-large-folder tool
Verified signature56bbdce -
Add files using upload-large-folder tool
Verified signature5b48738 -
Add files using upload-large-folder tool
Verified signature6f7b6cb -
Add files using upload-large-folder tool
Verified signature12ec8fb -
Add files using upload-large-folder tool
Verified signaturea1ec45e -
Add files using upload-large-folder tool
Verified signaturef5ed80e
-
initial commit
Verified signature385269b