Instructions to use Zyphra/ZAYA1-VL-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zyphra/ZAYA1-VL-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Zyphra/ZAYA1-VL-8B") 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)# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("Zyphra/ZAYA1-VL-8B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Zyphra/ZAYA1-VL-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zyphra/ZAYA1-VL-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zyphra/ZAYA1-VL-8B", "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/Zyphra/ZAYA1-VL-8B
- SGLang
How to use Zyphra/ZAYA1-VL-8B 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 "Zyphra/ZAYA1-VL-8B" \ --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": "Zyphra/ZAYA1-VL-8B", "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 "Zyphra/ZAYA1-VL-8B" \ --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": "Zyphra/ZAYA1-VL-8B", "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 Zyphra/ZAYA1-VL-8B with Docker Model Runner:
docker model run hf.co/Zyphra/ZAYA1-VL-8B
Add paper and code links, and library metadata
#2
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
base_model:
|
| 4 |
- Zyphra/ZAYA1-base
|
|
|
|
| 5 |
pipeline_tag: image-text-to-text
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
# ZAYA1-VL-8B
|
| 9 |
|
| 10 |
ZAYA1-VL-8B is a vision-language model (VLM) built upon Zyphra's ZAYA1-8B LLM. It has state-of-the-art performance among VLMs for its size and inference efficiency.
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
ZAYA1-VL-8B is open-sourced under the Apache 2.0 license.
|
| 15 |
|
|
@@ -106,4 +109,4 @@ inputs = {key: value.to(device) for key, value in inputs.items()}
|
|
| 106 |
|
| 107 |
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 108 |
print(processor.tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
|
| 109 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model:
|
| 3 |
- Zyphra/ZAYA1-base
|
| 4 |
+
license: apache-2.0
|
| 5 |
pipeline_tag: image-text-to-text
|
| 6 |
+
library_name: transformers
|
| 7 |
---
|
| 8 |
|
| 9 |
# ZAYA1-VL-8B
|
| 10 |
|
| 11 |
ZAYA1-VL-8B is a vision-language model (VLM) built upon Zyphra's ZAYA1-8B LLM. It has state-of-the-art performance among VLMs for its size and inference efficiency.
|
| 12 |
|
| 13 |
+
- **Paper:** [ZAYA1-VL-8B Technical Report](https://huggingface.co/papers/2605.08560)
|
| 14 |
+
- **Code:** [GitHub (zaya1-vl branch)](https://github.com/Zyphra/transformers/tree/zaya1-vl)
|
| 15 |
+
- **Blog:** [Announcement blog post](https://www.zyphra.com/post/zaya1-vl-8b)
|
| 16 |
|
| 17 |
ZAYA1-VL-8B is open-sourced under the Apache 2.0 license.
|
| 18 |
|
|
|
|
| 109 |
|
| 110 |
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 111 |
print(processor.tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
|
| 112 |
+
```
|