Image-Text-to-Text
Transformers
Safetensors
Vietnamese
English
Chinese
internvl_chat
feature-extraction
conversational
custom_code
Instructions to use 5CD-AI/Vintern-1B-v3_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 5CD-AI/Vintern-1B-v3_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="5CD-AI/Vintern-1B-v3_5", trust_remote_code=True) 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 AutoModel model = AutoModel.from_pretrained("5CD-AI/Vintern-1B-v3_5", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 5CD-AI/Vintern-1B-v3_5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "5CD-AI/Vintern-1B-v3_5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "5CD-AI/Vintern-1B-v3_5", "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/5CD-AI/Vintern-1B-v3_5
- SGLang
How to use 5CD-AI/Vintern-1B-v3_5 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 "5CD-AI/Vintern-1B-v3_5" \ --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": "5CD-AI/Vintern-1B-v3_5", "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 "5CD-AI/Vintern-1B-v3_5" \ --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": "5CD-AI/Vintern-1B-v3_5", "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 5CD-AI/Vintern-1B-v3_5 with Docker Model Runner:
docker model run hf.co/5CD-AI/Vintern-1B-v3_5
namdx
#3
by donam236 - opened
README.md
CHANGED
|
@@ -66,13 +66,6 @@ The model can be customized for specific tasks with minimal effort.
|
|
| 66 |
|
| 67 |
</div>
|
| 68 |
|
| 69 |
-
## Llama.cpp - Realtime CPU demo by ngxson.
|
| 70 |
-
<div style="display: flex; justify-content: center; align-items: center;">
|
| 71 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/l7HDtxU4x7sctZvahDoLA.gif" />
|
| 72 |
-
</div>
|
| 73 |
-
|
| 74 |
-
Github: https://github.com/ngxson/vintern-realtime-demo Thanks Son :)
|
| 75 |
-
|
| 76 |
## Examples
|
| 77 |
|
| 78 |
|
|
@@ -86,6 +79,21 @@ Github: https://github.com/ngxson/vintern-realtime-demo Thanks Son :)
|
|
| 86 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/N_tT8gSLayhrfrVTMCeT9.png" width="400"/>
|
| 87 |
</div>
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
## Quickstart
|
| 91 |
|
|
@@ -201,10 +209,6 @@ print(f'User: {question}\nAssistant: {response}')
|
|
| 201 |
#print(f'User: {question}\nAssistant: {response}')
|
| 202 |
```
|
| 203 |
|
| 204 |
-
## 🚀🛠️ Fine-tune using your own data 📂✨
|
| 205 |
-
|
| 206 |
-
https://colab.research.google.com/drive/1Iu6ssNvlA2bNGlOLq7xR0l-5qtBIqul4
|
| 207 |
-
|
| 208 |
## Citation
|
| 209 |
|
| 210 |
```
|
|
|
|
| 66 |
|
| 67 |
</div>
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
## Examples
|
| 70 |
|
| 71 |
|
|
|
|
| 79 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/N_tT8gSLayhrfrVTMCeT9.png" width="400"/>
|
| 80 |
</div>
|
| 81 |
|
| 82 |
+
<div style="display: flex; justify-content: center; align-items: center;">
|
| 83 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/wUM70ifQSpdbO_dLH1TLO.png" width="300" style="margin-right: 10px;"/>
|
| 84 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/yxWlGKMP7458UbtIzosUK.png" width="300"/>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<!-- <div style="display: flex; justify-content: center; align-items: center;">
|
| 88 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/SH7-fvyZok9Kqm1XoD4E0.png" width="200" style="margin-right: 10px;"/>
|
| 89 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/6gyL4ymSWyuHwfy9dVVju.png" width="500"/>
|
| 90 |
+
</div>
|
| 91 |
+
-->
|
| 92 |
+
<div style="display: flex; justify-content: center; align-items: center;">
|
| 93 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/s4j3m7iUqj9LUVtHvdU2x.png" width="300" style="margin-right: 10px;"/>
|
| 94 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/OD6igRwEmnKt92wy4dCzx.png" width="300"/>
|
| 95 |
+
</div>
|
| 96 |
+
|
| 97 |
|
| 98 |
## Quickstart
|
| 99 |
|
|
|
|
| 209 |
#print(f'User: {question}\nAssistant: {response}')
|
| 210 |
```
|
| 211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
## Citation
|
| 213 |
|
| 214 |
```
|