Instructions to use zai-org/GLM-4.6V with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-4.6V with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="zai-org/GLM-4.6V") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("zai-org/GLM-4.6V") model = AutoModelForMultimodalLM.from_pretrained("zai-org/GLM-4.6V", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.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.6V 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.6V" # 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.6V", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/zai-org/GLM-4.6V
- SGLang
How to use zai-org/GLM-4.6V 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.6V" \ --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.6V", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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.6V" \ --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.6V", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use zai-org/GLM-4.6V with Docker Model Runner:
docker model run hf.co/zai-org/GLM-4.6V
Commit History
-
Add model-index with benchmark evaluations
Verified signatureAdded structured evaluation results from benchmark comparison (36 benchmarks): **General VQA:** - MMBench V1.1: 88.8, MMBench V1.1 (CN): 88.2, MMStar: 75.9, BLINK (Val): 65.5, MUIRBENCH: 77.1 **Multimodal Reasoning:** - MMMU (Val): 76.0, MMMU_Pro: 66.0, VideoMMU: 74.7, MathVista: 85.2, AI2D: 88.8, DynaMath: 54.5, WeMath: 69.8, ZeroBench (sub): 25.8 **Multimodal Agentic:** - MMBrowseComp: 7.6, Design2Code: 88.6, Flame-React-Eval: 86.3, OSWorld: 37.2, AndroidWorld: 57.0, WebVoyager: 81.0, Webquest-SingleQA: 79.5, Webquest-MultiQA: 59.0 **Multimodal Long Context:** - MMLongBench-Doc: 54.9, MMLongBench-128K: 64.1, LVBench: 59.5 **OCR & Chart:** - OCRBench: 86.5, OCR-Bench_v2 (EN): 65.1, OCR-Bench_v2 (CN): 59.6, ChartQAPro: 65.5, ChartMuseum: 58.4, CharXiv_Val-Reasoning: 63.2 **Spatial & Grounding:** - OmniSpatial: 52.0, RefCOCO-avg (val): 88.6, TreeBench: 51.4, Ref-L4-test: 88.9 This enables the model to appear in leaderboards and makes it easier to compare with other models.db10830 -
api link
zRzRzRzRzRzRzR82f2a5c -
update
zRzRzRzRzRzRzR387eda4 -
update
zRzRzRzRzRzRzR833cb56 -
update
zRzRzRzRzRzRzRb8fe4c2 -
update
zRzRzRzRzRzRzR1293c8b
-
Update config.json
Verified signaturee5323a8 -
Add files using upload-large-folder tool
Verified signature0db1301 -
initial commit
Verified signature4ba8b9c