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
|
@@ -104,7 +104,6 @@ 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 |
-
|
| 108 |
<div align="center">
|
| 109 |
<img src="ex_2.jpg" width="400"/>
|
| 110 |
</div>
|
|
@@ -119,6 +118,25 @@ Assistant: Bài thơ có nội dung:
|
|
| 119 |
- Chăm lo con cái, làm việc siêng năng.
|
| 120 |
```
|
| 121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
## Quickstart
|
| 124 |
|
|
|
|
| 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 |
<div align="center">
|
| 108 |
<img src="ex_2.jpg" width="400"/>
|
| 109 |
</div>
|
|
|
|
| 118 |
- Chăm lo con cái, làm việc siêng năng.
|
| 119 |
```
|
| 120 |
|
| 121 |
+
<div align="center">
|
| 122 |
+
<img src="ex_3.png" width="400"/>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
```
|
| 126 |
+
User: <image>
|
| 127 |
+
Mô tả hình ảnh chi tiết.
|
| 128 |
+
Assistant: Bức ảnh chụp một bảng đen với các công thức toán học được viết bằng phấn trắng. Ở góc trên bên trái, có dòng chữ "20/19/SGK" được viết bằng màu vàng nhạt. Tiếp theo là phần a) với hai phương trình:
|
| 129 |
+
3x + y = 3
|
| 130 |
+
2x - y = 7
|
| 131 |
+
Dưới hai phương trình này là mũi tên chỉ sang phải và hai phương trình mới:
|
| 132 |
+
5x = 10
|
| 133 |
+
3x + y = 3
|
| 134 |
+
3.2 + y = 3
|
| 135 |
+
Sau đó là dòng chữ "x = 2"
|
| 136 |
+
y = -3
|
| 137 |
+
Cuối cùng là dòng chữ "Vậy hpt đã cho có no! (x; y) = (2; -3)"
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
|
| 141 |
## Quickstart
|
| 142 |
|