Image-Text-to-Text
Transformers
Safetensors
Vietnamese
English
Chinese
internvl_chat
feature-extraction
conversational
custom_code
Instructions to use 5CD-AI/Vintern-3B-beta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 5CD-AI/Vintern-3B-beta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="5CD-AI/Vintern-3B-beta", 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-3B-beta", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 5CD-AI/Vintern-3B-beta with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "5CD-AI/Vintern-3B-beta" # 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-3B-beta", "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-3B-beta
- SGLang
How to use 5CD-AI/Vintern-3B-beta 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-3B-beta" \ --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-3B-beta", "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-3B-beta" \ --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-3B-beta", "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-3B-beta with Docker Model Runner:
docker model run hf.co/5CD-AI/Vintern-3B-beta
Update README.md
Browse files
README.md
CHANGED
|
@@ -92,68 +92,18 @@ The current results are at a quite good level, and we are expanding the training
|
|
| 92 |
| MathVistatestmini| 46.0 | 39.8 | 43.0 | 43.9 |
|
| 93 |
|
| 94 |
|
| 95 |
-
|
| 96 |
-
<!-- ## VLSP2023: ViVRC Challenge Benchmark
|
| 97 |
-
|
| 98 |
-
| **Name** | **F1** |
|
| 99 |
-
|:----------------------:|:-----------:|
|
| 100 |
-
| ICNLP | 3.6384 |
|
| 101 |
-
| **Vintern-4B-v1** | 3.5514 |
|
| 102 |
-
| **Vintern-3B-beta** | **3.5266** |
|
| 103 |
-
| **Vintern-1B-v2** | 3.4616 |
|
| 104 |
-
| linh | 3.4293 |
|
| 105 |
-
| DS@ViVRC | 3.4121 |
|
| 106 |
-
| DS@UIT Dynasty | 3.3172 |
|
| 107 |
-
| NTQ Solution | 3.2926 |
|
| 108 |
-
| I, Me & Myself | 3.2396 |
|
| 109 |
-
| AVQA_AIO | 2.9018 |
|
| 110 |
-
| **Vintern-1B-v1** | 2.7256 |
|
| 111 |
-
| NguyenLe | 2.7053 |
|
| 112 |
-
| nowj2 | 1.6808 | -->
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
<!-- ## Examples
|
| 116 |
-
|
| 117 |
-
<div align="center">
|
| 118 |
-
<img src="https://drscdn.500px.org/photo/1100852428/q%3D90_m%3D2048/v2?sig=7a6df43806315966517e2506394d71561f113321e0a4efc7d442e7303b5e97c7" width="400"/>
|
| 119 |
-
</div>
|
| 120 |
-
|
| 121 |
-
```
|
| 122 |
-
|
| 123 |
-
```
|
| 124 |
-
|
| 125 |
-
<div align="center">
|
| 126 |
-
<img src="https://drscdn.500px.org/photo/1100852641/q%3D90_m%3D2048/v2?sig=aba53dbde6a7e50d6c3d45289d47145c1a2c5c6708e3fb4b6fad721d4fc8a195" width="400"/>
|
| 127 |
-
</div>
|
| 128 |
-
|
| 129 |
-
```
|
| 130 |
-
|
| 131 |
-
```
|
| 132 |
-
|
| 133 |
-
<div align="center">
|
| 134 |
-
<img src="https://drscdn.500px.org/photo/1100852792/q%3D90_m%3D2048/v2?sig=d88c04be7beee1eebca7081251c11d0daeafa558bee0aa8a6fd3103b1556c5f5" width="400"/>
|
| 135 |
-
</div>
|
| 136 |
-
|
| 137 |
-
```
|
| 138 |
-
|
| 139 |
-
```
|
| 140 |
|
| 141 |
<div align="center">
|
| 142 |
-
<img src="
|
| 143 |
</div>
|
| 144 |
|
| 145 |
```
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
<div align="center">
|
| 150 |
-
<img src="https://drscdn.500px.org/photo/1100854109/q%3D90_m%3D2048/v2?sig=192a484e7207aafd7b827b1b42ceb24fdb740e2f6aab15cec21bd64ce0268d15" width="400"/>
|
| 151 |
-
</div>
|
| 152 |
-
|
| 153 |
```
|
| 154 |
|
| 155 |
-
``` -->
|
| 156 |
-
|
| 157 |
## Quickstart
|
| 158 |
|
| 159 |
Here provides a code snippet to show you how to load the tokenizer and model and how to generate contents.
|
|
|
|
| 92 |
| MathVistatestmini| 46.0 | 39.8 | 43.0 | 43.9 |
|
| 93 |
|
| 94 |
|
| 95 |
+
## Examples
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
<div align="center">
|
| 98 |
+
<img src="ex_1.jpg" width="400"/>
|
| 99 |
</div>
|
| 100 |
|
| 101 |
```
|
| 102 |
+
User: <image>
|
| 103 |
+
Liệt kê toàn bộ bài thơ có trong ảnh.
|
| 104 |
+
Assistant: Đi khắp thế gian không ai tốt bằng mẹ Gánh nặng cuộc đời không ai khổ bằng cha
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
```
|
| 106 |
|
|
|
|
|
|
|
| 107 |
## Quickstart
|
| 108 |
|
| 109 |
Here provides a code snippet to show you how to load the tokenizer and model and how to generate contents.
|