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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("5CD-AI/Vintern-1B-v3_5", trust_remote_code=True, device_map="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
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,16 +10,19 @@ base_model:
|
|
| 10 |
pipeline_tag: image-text-to-text
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
# Vintern-1B-v3.5 ❄️ (Viet-InternVL2-1B-v3.5) - The Ultimate Multimodal Solution 🌏
|
| 18 |
We introduce **Vintern-1B-v3.5**, the latest version in the Vintern series, offering significant improvements over v2 across all evaluation benchmarks. This model has been fine-tuned from **InternVL-1B-2.5**, which already good in Vietnamese tasks because it used [Viet-ShareGPT-4o-Text-VQA](https://huggingface.co/datasets/5CD-AI/Viet-ShareGPT-4o-Text-VQA) data during its fine-tuning process by the InternVL 2.5 [1] team.
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
To further enhance its performance in Vietnamese while maintaining robust capabilities on existing English datasets, **Vintern-1B-v3.5** has been fine-tuned using a vast amount of Vietnamese-specific data. This results in a model that is exceptionally powerful in text recognition, OCR, and understanding Vietnam-specific documents.
|
|
@@ -41,7 +44,9 @@ The model can be customized for specific tasks with minimal effort.
|
|
| 41 |
|
| 42 |
## Benchmarks 📈
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
| 45 |
|
| 46 |
| Benchmark | InternVL2_5 1B | Vintern-1B-v2 | Vintern-1B-v3.5 |
|
| 47 |
|:-------------:|:--------------:|:-------------:|:---------------:|
|
|
@@ -57,54 +62,26 @@ The model can be customized for specific tasks with minimal effort.
|
|
| 57 |
## Examples
|
| 58 |
|
| 59 |
<div align="center">
|
| 60 |
-
<img src="
|
| 61 |
</div>
|
| 62 |
|
| 63 |
-
```
|
| 64 |
-
|
| 65 |
-
```
|
| 66 |
-
|
| 67 |
<div align="center">
|
| 68 |
-
<img src="
|
| 69 |
</div>
|
| 70 |
|
| 71 |
-
```
|
| 72 |
|
| 73 |
-
```
|
| 74 |
|
| 75 |
<div align="center">
|
| 76 |
-
<img src="
|
| 77 |
</div>
|
| 78 |
|
| 79 |
-
```
|
| 80 |
-
|
| 81 |
-
```
|
| 82 |
-
|
| 83 |
-
<div align="center">
|
| 84 |
-
<img src="ex_images/3.png" width="400"/>
|
| 85 |
-
</div>
|
| 86 |
-
|
| 87 |
-
```
|
| 88 |
-
|
| 89 |
-
```
|
| 90 |
-
|
| 91 |
<div align="center">
|
| 92 |
-
<img src="
|
| 93 |
</div>
|
| 94 |
|
| 95 |
-
```
|
| 96 |
-
|
| 97 |
-
```
|
| 98 |
|
| 99 |
-
<div align="center">
|
| 100 |
-
<img src="ex_images/6.png" width="400"/>
|
| 101 |
-
</div>
|
| 102 |
|
| 103 |
|
| 104 |
-
```
|
| 105 |
-
|
| 106 |
-
```
|
| 107 |
-
|
| 108 |
## Quickstart
|
| 109 |
|
| 110 |
Here provides a code snippet to show you how to load the tokenizer and model and how to generate contents.
|
|
|
|
| 10 |
pipeline_tag: image-text-to-text
|
| 11 |
---
|
| 12 |
|
| 13 |
+
<div align="center">
|
| 14 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/-G297bBqMzYvTbD6_Bkd9.png" width="500"/>
|
| 15 |
+
</div>
|
| 16 |
|
| 17 |
# Vintern-1B-v3.5 ❄️ (Viet-InternVL2-1B-v3.5) - The Ultimate Multimodal Solution 🌏
|
| 18 |
We introduce **Vintern-1B-v3.5**, the latest version in the Vintern series, offering significant improvements over v2 across all evaluation benchmarks. This model has been fine-tuned from **InternVL-1B-2.5**, which already good in Vietnamese tasks because it used [Viet-ShareGPT-4o-Text-VQA](https://huggingface.co/datasets/5CD-AI/Viet-ShareGPT-4o-Text-VQA) data during its fine-tuning process by the InternVL 2.5 [1] team.
|
| 19 |
|
| 20 |
+
<div align="center">
|
| 21 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/a1V1DA1o4Gf_MJblWTz-L.png" width="500"/>
|
| 22 |
+
</div>
|
| 23 |
+
<div align="center">
|
| 24 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/36jb5bgyYCoVKx3NE8Iuv.png" width="500"/>
|
| 25 |
+
</div>
|
| 26 |
|
| 27 |
|
| 28 |
To further enhance its performance in Vietnamese while maintaining robust capabilities on existing English datasets, **Vintern-1B-v3.5** has been fine-tuned using a vast amount of Vietnamese-specific data. This results in a model that is exceptionally powerful in text recognition, OCR, and understanding Vietnam-specific documents.
|
|
|
|
| 44 |
|
| 45 |
## Benchmarks 📈
|
| 46 |
|
| 47 |
+
<div align="center">
|
| 48 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/DrUCZuXuMz47uVU4zqnJ4.png" width="500"/>
|
| 49 |
+
</div>
|
| 50 |
|
| 51 |
| Benchmark | InternVL2_5 1B | Vintern-1B-v2 | Vintern-1B-v3.5 |
|
| 52 |
|:-------------:|:--------------:|:-------------:|:---------------:|
|
|
|
|
| 62 |
## Examples
|
| 63 |
|
| 64 |
<div align="center">
|
| 65 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/1yos0APs6laTCAGhUbN9n.png" width="300"/>
|
| 66 |
</div>
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
<div align="center">
|
| 69 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/L5n35_3sz_Wp9fo0C7snq.png" width="300"/>
|
| 70 |
</div>
|
| 71 |
|
|
|
|
| 72 |
|
|
|
|
| 73 |
|
| 74 |
<div align="center">
|
| 75 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/E6aqBwFqK38XE1LL9lF2W.png" width="500"/>
|
| 76 |
</div>
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
<div align="center">
|
| 79 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6336b5c831efcb5647f00170/Lkt8YLYlDP_VByFjFQX_t.png" width="500"/>
|
| 80 |
</div>
|
| 81 |
|
|
|
|
|
|
|
|
|
|
| 82 |
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
## Quickstart
|
| 86 |
|
| 87 |
Here provides a code snippet to show you how to load the tokenizer and model and how to generate contents.
|