Instructions to use zai-org/GLM-4.7 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-4.7 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-4.7") 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.7") model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-4.7") 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.7 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.7" # 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.7", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-4.7
- SGLang
How to use zai-org/GLM-4.7 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.7" \ --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.7", "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.7" \ --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.7", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-4.7 with Docker Model Runner:
docker model run hf.co/zai-org/GLM-4.7
Create .eval_results/apex-agents.yaml
#53 opened 28 days ago
by
madhavan113
Create .eval_results/apex-v1-extended.yaml
#52 opened 29 days ago
by
madhavan113
Add YC-Bench benchmark result (avg $398,410)
#51 opened about 2 months ago
by
RiddleHe
Add SWE-bench Verified evaluation result (73.8%)
#50 opened 2 months ago
by
SaylorTwift
Create apex-agents.yaml
#48 opened 2 months ago
by
madhavan113
Install & run zai-org/GLM-4.7 easily using llmpm
#47 opened 2 months ago
by
sarthak-saxena
fix: `clear_thinking` inserts spurious `</think>` tag when reasoning_content is empty
#46 opened 2 months ago
by
beckyu
Add Terminal-Bench evaluation result (33.4%)
#44 opened 3 months ago
by
burtenshaw
Create .eval_results/evasionbench.yaml
#43 opened 3 months ago
by
FutureMa
如果GLM也出一个80B的开源模型,下载量应该也会在一周迅速突破十万。
#42 opened 3 months ago
by
mimeng1990
Does this model support MLA or only the flash version does?
4
#41 opened 3 months ago
by
Aly87
Add HLE evaluation result (with tools)
#40 opened 4 months ago
by
burtenshaw
Use message.reasoning when found
#39 opened 4 months ago
by
koushd
Add MMLU-Pro evaluation result
#38 opened 4 months ago
by
burtenshaw
which is the context length of GLM-4.7 ? 202752 or 128000 ?
3
#33 opened 4 months ago
by
tuo02
本地部署开源版本GLM-4.7并接入claude命令使用,就差最后一步!!!
2
#32 opened 4 months ago
by
wiesencao
When running GLM-4.7 with sglang-0.5.6 to process a /v1/chat/completions request, it encounters a BadRequestError
2
#30 opened 4 months ago
by
tuo02
Base Model / Air
🔥 5
#28 opened 4 months ago
by
tcpmux
# integration status unknown. # Please clone model and use locally. # Also feel free to open a Pull request # for integration of the huggingface model hub # into the corresponding library =)
#26 opened 4 months ago
by
Gaurab1785
使用这个模型编写代码的视频,如果你也想用它来编程的话
🤗 1
#25 opened 5 months ago
by
likewendy
Is Z.AI slow as molasses ? Do not buy yearly subsciption!!!
😔 3
9
#24 opened 5 months ago
by
krravi
New tool to benchmark GGUF files
#23 opened 5 months ago
by
Nerdsking
Rename README.md to O1.md
#21 opened 5 months ago
by
boylnwzav1
MLX[LMStudio] Enable Preserved Thinking Mode ?
❤️ 1
1
#20 opened 5 months ago
by
kartavyabagga
Unable to produce correct `object` type tool call param
4
#18 opened 5 months ago
by
arnrightnow
Production deployment considerations
#17 opened 5 months ago
by
Cagnicolas
Request Details on GPU ad memory requirements
5
#16 opened 5 months ago
by
DragoZatch
As a coding assistant in VS Code, it was disturbing.
9
#15 opened 5 months ago
by
krravi
Jinja模板是不是有问题
3
#14 opened 5 months ago
by
pty819
LM-4.7测评视频
#12 opened 5 months ago
by
leo009
best coding&reasoning model. thank you Z.AI
👍 6
4
#10 opened 5 months ago
by
Tugay31
Browsecomp/HLE Reproducibility | 结果复现
➕ 3
#9 opened 5 months ago
by
pandemo
This model is Awesome, it's has get a hug progress in coding...
#8 opened 5 months ago
by
Simon716
The scores for K2-thinking and MiMo-V2-Flash were mixed up
👀👍 2
2
#7 opened 5 months ago
by
StarryZhang
I'm even more looking forward to the GLM4.7 Air.
🚀 16
1
#6 opened 5 months ago
by
mimeng1990
Can we get a version that doesn't have the propaganda ?
🔥 1
9
#5 opened 5 months ago
by
trystans
GGUF support is here!
🔥🚀 5
2
#4 opened 5 months ago
by
AaryanK
Video of Step-by-Step Review and Testing
#3 opened 5 months ago
by
fahdmirzac
Is the GLM series a coding only model now?
👀 1
7
#2 opened 5 months ago
by
Doctor-Chad-PhD
we still need some Air
🚀👍 65
15
#1 opened 5 months ago
by
jacek2024