Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
zwz2
vision-language
visual-reasoning
reinforcement-learning
grpo
conversational
Instructions to use inclusionAI/ZwZ2-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inclusionAI/ZwZ2-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="inclusionAI/ZwZ2-9B") 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("inclusionAI/ZwZ2-9B") model = AutoModelForMultimodalLM.from_pretrained("inclusionAI/ZwZ2-9B", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use inclusionAI/ZwZ2-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inclusionAI/ZwZ2-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/ZwZ2-9B", "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/inclusionAI/ZwZ2-9B
- SGLang
How to use inclusionAI/ZwZ2-9B 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 "inclusionAI/ZwZ2-9B" \ --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": "inclusionAI/ZwZ2-9B", "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 "inclusionAI/ZwZ2-9B" \ --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": "inclusionAI/ZwZ2-9B", "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 inclusionAI/ZwZ2-9B with Docker Model Runner:
docker model run hf.co/inclusionAI/ZwZ2-9B
Commit History
Today
-
Delete assets/zwz2_family_firstgen_style.svg
Verified signature07bdf1e -
Delete assets/zwz2_family_firstgen_style.png
Verified signature8e85f2a -
Update README.md
Verified signature84ca0ba
Yesterday
-
Upload 6 files
Verified signature213773a -
Upload 6 files
Verified signature79fec27
2 days ago
-
Update README.md
Verified signature83fccd6 -
Update README.md
Verified signature31592b3 -
Update README.md
Verified signature1157f73 -
Update README.md
Verified signaturecae7ae6 -
Upload 6 files
Verified signaturef909684 -
Delete assets
Verified signature0990d2b -
Upload 4 files
Verified signature2f2461f -
Update README.md
Verified signature9206cb1 -
Delete assets
Verified signature86621bb -
Upload 4 files
Verified signature2331df8 -
Delete assets
Verified signature5c89d2b -
Delete assets/assets
Verified signaturecd92ef7 -
Upload 4 files
Verified signature1932ca1 -
Update README.md
Verified signature83dfb1c -
Upload 4 files
Verified signaturefdb86a2 -
Update ZwZ2-9B model card
Verified signaturea8c76a0
12 days ago
-
Add ZwZ2-9B model weights
Verified signature381a132 -
initial commit
Verified signature1fc5037