Instructions to use zai-org/GLM-4.6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-4.6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-4.6") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-4.6") model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-4.6") 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
- vLLM
How to use zai-org/GLM-4.6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zai-org/GLM-4.6" # 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-4.6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-4.6
- SGLang
How to use zai-org/GLM-4.6 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-4.6" \ --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-4.6", "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-4.6" \ --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-4.6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-4.6 with Docker Model Runner:
docker model run hf.co/zai-org/GLM-4.6
Create .eval_results/apex-agents.yaml
#36 opened about 1 month ago
by
madhavan113
Install & run zai-org/GLM-4.6 easily using llmpm
#35 opened 3 months ago
by
sarthak-saxena
Add SWE-Bench Pro evaluation results
#34 opened 3 months ago
by
nielsr
Add Terminal-Bench evaluation result (24.5%)
#33 opened 3 months ago
by
burtenshaw
Request: DOI
#32 opened 4 months ago
by
swensi
endless response
2
#31 opened 5 months ago
by
ramidahbash
Model hallucination and performance degradation
#30 opened 5 months ago
by
snxtyle
GLM-4.6 tokenizer error
#29 opened 6 months ago
by
aaabbb1234567
Add Artificial Analysis evaluations for glm-4-6
#28 opened 6 months ago
by
SeasonalFall84
Token Count Calculation in SFT Data Distribution Curation
#27 opened 6 months ago
by
tcy006
How to force GLM 4.6 to reason everytime
1
#26 opened 6 months ago
by
jerrydev11
May I have more information about LCB with tools?
1
#25 opened 7 months ago
by
KillingWhale
Congratulations to the Zhipu Team
👍 5
#24 opened 7 months ago
by
md-1415
GLM4.6 trained from OpenAI lol ??
😔 1
2
#23 opened 7 months ago
by
zackthnin
Will release Air version of GLM-4.6 today?
❤️ 5
7
#22 opened 7 months ago
by
mimeng1990
Genuine User Reviews and Questions on Repo zai-org/GLM-4.6
#20 opened 7 months ago
by
DeepNLP
Creativity is way better than Kimi K2, use on example of 3i Atlas scan origin
👀 1
3
#19 opened 7 months ago
by
krustik
no <think> tag between the response
2
#17 opened 7 months ago
by
wangxhhhhhhh
What is the Time Range Selected in the LCB V6 Benchmark?
2
#15 opened 8 months ago
by
wjmcat
never-ending reasoning
3
#14 opened 8 months ago
by
hsila
search-agent轨迹的相关问题咨询
👀 1
#13 opened 8 months ago
by
LeonardYue
模型推理陷入死循环
1
#11 opened 8 months ago
by
pypry
Thinking language difference with 4.5?
➕ 3
1
#10 opened 8 months ago
by
droussis
Will release Air version of GLM-4.6?
➕ 12
3
#9 opened 8 months ago
by
rosspanda0
Problem using chrome-devtools mcp
1
#8 opened 8 months ago
by
judamarto
German capabilities
👀 1
2
#7 opened 8 months ago
by
Behrens
🔥🔥🔥编程能力测评视频
#6 opened 8 months ago
by
leo009
very good for role-playing
👍 1
1
#5 opened 8 months ago
by
Kartoshka20012
Video of Step-by-Step Review and Testing
#4 opened 8 months ago
by
fahdmirzac
4.5 was already too good, whats await us in 4.6?
🤯 1
10
#3 opened 8 months ago
by
krustik
guys we also need some AIR
➕❤️ 50
30
#1 opened 8 months ago
by
jacek2024