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
Update README.md
Browse files
README.md
CHANGED
|
@@ -18,21 +18,23 @@ ZAYA1-VL-8B is open-sourced under the Apache 2.0 license.
|
|
| 18 |
|
| 19 |
### Model Architecture
|
| 20 |
|
|
|
|
|
|
|
| 21 |
ZAYA1-VL-8B builds upon and uses our [ZAYA1-8B LLM](https://huggingface.co/Zyphra/ZAYA1-base) as its base text decoder. We also use the [Qwen2.5-VL vision encoder](https://huggingface.co/docs/transformers/model_doc/qwen2_5_vl) for the ViT. ZAYA1-VL-8B introduces two novel architectural innovations:
|
| 22 |
|
| 23 |
* **Vision-specific LoRA parameters**: ZAYA1-VL-8B utilizes specialized LoRA parameters on its MLPs and CCA weights which are only activated on vision tokens. We find that adding vision-specific parameters substantially improves model performance since the model has the option to devote specific parameters solely to visual processing. We train these LoRA parameters alongside the main model parameters during training.
|
| 24 |
|
| 25 |
* **Bidirectional Attention for image tokens**: ZAYA1-VL-8B processes all image token inputs with a bidirectional attention mask, meaning attention is not causal across an image. We find that this improves performance by not imposing an arbitrary causal order to image tokens which are naturally non-causal.
|
| 26 |
|
| 27 |
-

|
| 28 |
|
| 29 |
ZAYA1-VL-8B is trained only upon open data. Detailed dataset descriptions can be found in the accompanying technical report.
|
| 30 |
|
| 31 |
## Performance
|
| 32 |
|
|
|
|
|
|
|
| 33 |
ZAYA1-VL-8B performs extremely strongly against models of a comparable size and inference flops including outperforming several strong larger models.
|
| 34 |
|
| 35 |
-

|
| 36 |
|
| 37 |
| Eval | ZAYA1-VL-8B(0.7B / 8B) | MolmoE(1.2B / 8B) | Qwen3.5-2B | InternVL3.5-20B(20B / 4B) | Molmo2-4B | Qwen3.5-4B |
|
| 38 |
|---|---:|---:|---:|---:|---:|---:|
|
|
|
|
| 18 |
|
| 19 |
### Model Architecture
|
| 20 |
|
| 21 |
+

|
| 22 |
+
|
| 23 |
ZAYA1-VL-8B builds upon and uses our [ZAYA1-8B LLM](https://huggingface.co/Zyphra/ZAYA1-base) as its base text decoder. We also use the [Qwen2.5-VL vision encoder](https://huggingface.co/docs/transformers/model_doc/qwen2_5_vl) for the ViT. ZAYA1-VL-8B introduces two novel architectural innovations:
|
| 24 |
|
| 25 |
* **Vision-specific LoRA parameters**: ZAYA1-VL-8B utilizes specialized LoRA parameters on its MLPs and CCA weights which are only activated on vision tokens. We find that adding vision-specific parameters substantially improves model performance since the model has the option to devote specific parameters solely to visual processing. We train these LoRA parameters alongside the main model parameters during training.
|
| 26 |
|
| 27 |
* **Bidirectional Attention for image tokens**: ZAYA1-VL-8B processes all image token inputs with a bidirectional attention mask, meaning attention is not causal across an image. We find that this improves performance by not imposing an arbitrary causal order to image tokens which are naturally non-causal.
|
| 28 |
|
|
|
|
| 29 |
|
| 30 |
ZAYA1-VL-8B is trained only upon open data. Detailed dataset descriptions can be found in the accompanying technical report.
|
| 31 |
|
| 32 |
## Performance
|
| 33 |
|
| 34 |
+

|
| 35 |
+
|
| 36 |
ZAYA1-VL-8B performs extremely strongly against models of a comparable size and inference flops including outperforming several strong larger models.
|
| 37 |
|
|
|
|
| 38 |
|
| 39 |
| Eval | ZAYA1-VL-8B(0.7B / 8B) | MolmoE(1.2B / 8B) | Qwen3.5-2B | InternVL3.5-20B(20B / 4B) | Molmo2-4B | Qwen3.5-4B |
|
| 40 |
|---|---:|---:|---:|---:|---:|---:|
|