Instructions to use zai-org/GLM-4.7-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-4.7-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-4.7-Flash") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-4.7-Flash") model = AutoModelForMultimodalLM.from_pretrained("zai-org/GLM-4.7-Flash") 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-4.7-Flash 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-Flash" # 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-Flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-4.7-Flash
- SGLang
How to use zai-org/GLM-4.7-Flash 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-Flash" \ --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-Flash", "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-Flash" \ --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-Flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-4.7-Flash with Docker Model Runner:
docker model run hf.co/zai-org/GLM-4.7-Flash
zRzRzRzRzRzRzR commited on
Commit ·
9980c03
1
Parent(s): 93e5632
update bench
Browse files
README.md
CHANGED
|
@@ -41,6 +41,29 @@ GLM-4.7-Flash is a 30B-A3B MoE model. As the strongest model in the 30B class, G
|
|
| 41 |
| BrowseComp | 42.8 | 2.29 | 28.3 |
|
| 42 |
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
## Serve GLM-4.7-Flash Locally
|
| 45 |
|
| 46 |
For local deployment, GLM-4.7-Flash supports inference frameworks including vLLM and SGLang. Comprehensive deployment
|
|
|
|
| 41 |
| BrowseComp | 42.8 | 2.29 | 28.3 |
|
| 42 |
|
| 43 |
|
| 44 |
+
### Evaluation Parameters
|
| 45 |
+
|
| 46 |
+
**Default Settings (Most Tasks)**
|
| 47 |
+
|
| 48 |
+
* temperature: `1.0`
|
| 49 |
+
* top-p: `0.95`
|
| 50 |
+
* max new tokens: `131072`
|
| 51 |
+
|
| 52 |
+
For multi-turn agentic tasks (τ²-Bench and Terminal Bench 2), please turn on [Preserved Thinking mode](https://docs.z.ai/guides/capabilities/thinking-mode).
|
| 53 |
+
|
| 54 |
+
**Terminal Bench, SWE Bench Verified**
|
| 55 |
+
|
| 56 |
+
* temperature: `0.7`
|
| 57 |
+
* top-p: `1.0`
|
| 58 |
+
* max new tokens: `16384`
|
| 59 |
+
|
| 60 |
+
**τ^2-Bench**
|
| 61 |
+
|
| 62 |
+
* Temperature: `0`
|
| 63 |
+
* Max new tokens: `16384`
|
| 64 |
+
|
| 65 |
+
For τ^2-Bench evaluation, we added an additional prompt to the Retail and Telecom user interaction to avoid failure modes caused by users ending the interaction incorrectly. For the Airline domain, we applied the domain fixes as proposed in the [Claude Opus 4.5](https://assets.anthropic.com/m/64823ba7485345a7/Claude-Opus-4-5-System-Card.pdf) release report.
|
| 66 |
+
|
| 67 |
## Serve GLM-4.7-Flash Locally
|
| 68 |
|
| 69 |
For local deployment, GLM-4.7-Flash supports inference frameworks including vLLM and SGLang. Comprehensive deployment
|