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, dtype="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
|
@@ -137,6 +137,28 @@ 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 |
|
|
|
|
| 137 |
Cuối cùng là dòng chữ "Vậy hpt đã cho có no! (x; y) = (2; -3)"
|
| 138 |
```
|
| 139 |
|
| 140 |
+
<div align="center">
|
| 141 |
+
<img src="ex_4.jpg" width="400"/>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
```
|
| 145 |
+
User: <image>
|
| 146 |
+
Mô tả hình ảnh chi tiết.
|
| 147 |
+
Assistant: Bức ảnh minh họa quá trình xử lý hình ảnh bằng mạng lưới thần kinh nhân tạo (CNN). Bức ảnh được chia thành 3 phần chính:
|
| 148 |
+
|
| 149 |
+
1. **Phần đầu tiên:** Hiển thị một hình ảnh của một chiếc xe hơi màu trắng với dòng chữ "input image" ở bên dưới.
|
| 150 |
+
2. **Phần thứ hai:** Hiển thị 6 khối vuông, mỗi khối đại diện cho một lớp trong mạng CNN. Các lớp được đánh số thứ tự từ trái sang phải:
|
| 151 |
+
* Convolutional layer
|
| 152 |
+
* Pooling layer
|
| 153 |
+
* Convolutional layer
|
| 154 |
+
* Pooling layer
|
| 155 |
+
* Fully-connected layer
|
| 156 |
+
* Predicted class
|
| 157 |
+
3. **Phần thứ ba:** Hiển thị một hình ảnh với dòng chữ "car" ở bên dưới.
|
| 158 |
+
|
| 159 |
+
Một mũi tên màu đen nối các khối vuông với nhau, thể hiện quá trình truyền dữ liệu giữa các lớp.
|
| 160 |
+
```
|
| 161 |
+
|
| 162 |
|
| 163 |
## Quickstart
|
| 164 |
|