Instructions to use zeromodels/deepseek_vl_7b_chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/deepseek_vl_7b_chat with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/deepseek_vl_7b_chat") - Keras
How to use zeromodels/deepseek_vl_7b_chat with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://zeromodels/deepseek_vl_7b_chat") - Notebooks
- Google Colab
- Kaggle
File size: 4,175 Bytes
9e53345 65e4bb8 9e53345 65e4bb8 9e53345 d78d4b3 9e53345 d78d4b3 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 65e4bb8 9e53345 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | ---
pipeline_tag: image-text-to-text
license: other
license_name: deepseek
license_link: https://huggingface.co/deepseek-ai/deepseek-vl-7b-chat/blob/main/LICENSE
base_model: deepseek-ai/deepseek-vl-7b-chat
library_name: zeromodels
tags:
- keras
- zeromodels
- deepseek-vl
- vision-language
- image-text-to-text
- arxiv:2403.05525
- pytorch
- jax
- tf
---
## ***See [our collection](https://huggingface.co/collections/zeromodels/deepseek-vl-6a8eae46513968553cfd826d) for all versions of DeepSeek-VL.***
# Run DeepSeek-VL with Keras 3: JAX, PyTorch, or TensorFlow
[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/deepseek_vl_hybrid/) [](https://huggingface.co/collections/zeromodels/deepseek-vl-6a8eae46513968553cfd826d)
# zeromodels/deepseek_vl_7b_chat
Paper: [DeepSeek-VL: Towards Real-World Vision-Language Understanding (arXiv:2403.05525)](https://arxiv.org/abs/2403.05525) · [HF Papers](https://huggingface.co/papers/2403.05525)
DeepSeek-VL **7B hybrid** uses a dual vision tower (SigLIP @384 + SAM-style @1024) and a 3-way aligner for finer detail and small text. Import from `zeromodels.models.deepseek_vl_hybrid` (not `deepseek_vl`).
For more details on the model, please go to the upstream [model card](https://huggingface.co/deepseek-ai/deepseek-vl-7b-chat).
Pure-**Keras 3** conversion of [`deepseek-ai/deepseek-vl-7b-chat`](https://huggingface.co/deepseek-ai/deepseek-vl-7b-chat) for [zeromodels](https://github.com/IMvision12/ZeroModels). One implementation runs unmodified on **TensorFlow / Torch / JAX**.
This is a **vision-language** (chat) checkpoint (`DeepseekVLHybridConditionalGenerate`, 7B chat (SigLIP + SAM hybrid)).
## ✨ Quick start
```python
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from PIL import Image
from zeromodels.models.deepseek_vl_hybrid import (
DeepseekVLHybridConditionalGenerate,
DeepseekVLHybridProcessor,
)
model = DeepseekVLHybridConditionalGenerate.from_weights("zeromodels/deepseek_vl_7b_chat")
processor = DeepseekVLHybridProcessor.from_weights("zeromodels/deepseek_vl_7b_chat")
image = Image.open("your_image.jpg")
inputs = processor(
conversation=[
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": "Describe this image in one sentence."},
],
}
]
)
outputs = model.generate(**inputs, max_new_tokens=64)
print(processor.decode(outputs[0]))
```
Load any DeepSeek-VL variant the same way with `from_weights("zeromodels/<variant>")`:
| Variant | Hub | Notes |
|---|---|---|
| `deepseek_vl_1.3b_base` | [`zeromodels/deepseek_vl_1.3b_base`](https://huggingface.co/zeromodels/deepseek_vl_1.3b_base) | 1.3B base |
| `deepseek_vl_1.3b_chat` | [`zeromodels/deepseek_vl_1.3b_chat`](https://huggingface.co/zeromodels/deepseek_vl_1.3b_chat) | 1.3B chat |
| `deepseek_vl_7b_base` | [`zeromodels/deepseek_vl_7b_base`](https://huggingface.co/zeromodels/deepseek_vl_7b_base) | 7B hybrid base |
| `deepseek_vl_7b_chat` | [`zeromodels/deepseek_vl_7b_chat`](https://huggingface.co/zeromodels/deepseek_vl_7b_chat) | 7B hybrid chat |
## Tips
- Set `KERAS_BACKEND` **before** importing Keras / zeromodels.
- Prefer `Processor.from_weights(...)` so vision + tokenizer match.
- 7B hybrid is a **different package** than 1.3B; do not mix imports.
- See [docs](https://imvision12.github.io/ZeroModels/deepseek_vl_hybrid/) and [Loading Weights](https://imvision12.github.io/ZeroModels/loading_weights/).
- Community / upstream safetensors still work via the `hf:` prefix, e.g. `DeepseekVLHybridConditionalGenerate.from_weights("hf:deepseek-ai/deepseek-vl-7b-chat")`.
## Special Thanks
A huge thank you to the DeepSeek-VL authors for creating and releasing these models.
License: DeepSeek (`other` / deepseek). See [LICENSE](https://huggingface.co/deepseek-ai/deepseek-vl-7b-chat/blob/main/LICENSE).
|