Instructions to use TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic
- SGLang
How to use TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic 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 "TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic" \ --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": "TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic", "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 "TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic" \ --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": "TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic with Docker Model Runner:
docker model run hf.co/TsinghuaC3I/ZEDA-GLM-4.7-Flash-Dynamic
| { | |
| "added_tokens_decoder": { | |
| "154820": { | |
| "content": "<|endoftext|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154821": { | |
| "content": "[MASK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154822": { | |
| "content": "[gMASK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154823": { | |
| "content": "[sMASK]", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154824": { | |
| "content": "<sop>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154825": { | |
| "content": "<eop>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154826": { | |
| "content": "<|system|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154827": { | |
| "content": "<|user|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154828": { | |
| "content": "<|assistant|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154829": { | |
| "content": "<|observation|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154830": { | |
| "content": "<|begin_of_image|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154831": { | |
| "content": "<|end_of_image|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154832": { | |
| "content": "<|begin_of_video|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154833": { | |
| "content": "<|end_of_video|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154834": { | |
| "content": "<|begin_of_audio|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154835": { | |
| "content": "<|end_of_audio|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154836": { | |
| "content": "<|begin_of_transcription|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154837": { | |
| "content": "<|end_of_transcription|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": true | |
| }, | |
| "154838": { | |
| "content": "<|code_prefix|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154839": { | |
| "content": "<|code_middle|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154840": { | |
| "content": "<|code_suffix|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154841": { | |
| "content": "<think>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154842": { | |
| "content": "</think>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154843": { | |
| "content": "<tool_call>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154844": { | |
| "content": "</tool_call>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154845": { | |
| "content": "<tool_response>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154846": { | |
| "content": "</tool_response>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154847": { | |
| "content": "<arg_key>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154848": { | |
| "content": "</arg_key>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154849": { | |
| "content": "<arg_value>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154850": { | |
| "content": "</arg_value>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154851": { | |
| "content": "/nothink", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154852": { | |
| "content": "<|begin_of_box|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154853": { | |
| "content": "<|end_of_box|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154854": { | |
| "content": "<|image|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| }, | |
| "154855": { | |
| "content": "<|video|>", | |
| "single_word": false, | |
| "lstrip": false, | |
| "rstrip": false, | |
| "normalized": false, | |
| "special": false | |
| } | |
| }, | |
| "additional_special_tokens": [ | |
| "<|endoftext|>", | |
| "[MASK]", | |
| "[gMASK]", | |
| "[sMASK]", | |
| "<sop>", | |
| "<eop>", | |
| "<|system|>", | |
| "<|user|>", | |
| "<|assistant|>", | |
| "<|observation|>", | |
| "<|begin_of_image|>", | |
| "<|end_of_image|>", | |
| "<|begin_of_video|>", | |
| "<|end_of_video|>", | |
| "<|begin_of_audio|>", | |
| "<|end_of_audio|>", | |
| "<|begin_of_transcription|>", | |
| "<|end_of_transcription|>" | |
| ], | |
| "clean_up_tokenization_spaces": false, | |
| "do_lower_case": false, | |
| "eos_token": "<|endoftext|>", | |
| "extra_special_tokens": {}, | |
| "model_max_length": 128000, | |
| "pad_token": "<|endoftext|>", | |
| "padding_side": "left", | |
| "remove_space": false, | |
| "tokenizer_class": "PreTrainedTokenizer" | |
| } | |