Instructions to use zaidwhys/deepseek-vl2-tiny-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zaidwhys/deepseek-vl2-tiny-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="zaidwhys/deepseek-vl2-tiny-hf") 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 AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("zaidwhys/deepseek-vl2-tiny-hf", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zaidwhys/deepseek-vl2-tiny-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zaidwhys/deepseek-vl2-tiny-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zaidwhys/deepseek-vl2-tiny-hf", "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/zaidwhys/deepseek-vl2-tiny-hf
- SGLang
How to use zaidwhys/deepseek-vl2-tiny-hf 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 "zaidwhys/deepseek-vl2-tiny-hf" \ --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": "zaidwhys/deepseek-vl2-tiny-hf", "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 "zaidwhys/deepseek-vl2-tiny-hf" \ --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": "zaidwhys/deepseek-vl2-tiny-hf", "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 zaidwhys/deepseek-vl2-tiny-hf with Docker Model Runner:
docker model run hf.co/zaidwhys/deepseek-vl2-tiny-hf
deepseek-vl2-tiny (Transformers format)
deepseek-ai/deepseek-vl2-tiny converted to the native Transformers format with the conversion script from huggingface/transformers#51020 (Add DeepSeek-VL2). The weights are unchanged apart from key renames; the chat template reproduces the original conversation format.
This is an unofficial conversion for reviewing that pull request. It needs a Transformers build that includes DeepSeek-VL2 support.
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "zaidwhys/deepseek-vl2-tiny-hf"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, device_map="auto")
Greedy generation on DeepSeek's monday.jpg demo image with "Describe this image in one sentence." matches the
original deepseek-ai/DeepSeek-VL2 code (bf16, CPU).
License
The model is released by DeepSeek under the DeepSeek Model License, included in this repository. Use of this model and of any derivative is subject to the use-based restrictions in paragraph 5 and Attachment A of that license. Paper: DeepSeek-VL2.
- Downloads last month
- 49
Model tree for zaidwhys/deepseek-vl2-tiny-hf
Base model
deepseek-ai/deepseek-vl2-tiny