Image-Text-to-Text
Transformers
Safetensors
Vietnamese
English
internvl_chat
feature-extraction
vision
conversational
custom_code
Instructions to use 5CD-AI/Vintern-1B-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 5CD-AI/Vintern-1B-v2 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-v2", 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-v2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 5CD-AI/Vintern-1B-v2 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-v2" # 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-v2", "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-v2
- SGLang
How to use 5CD-AI/Vintern-1B-v2 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-v2" \ --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-v2", "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-v2" \ --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-v2", "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-v2 with Docker Model Runner:
docker model run hf.co/5CD-AI/Vintern-1B-v2
Change license to non-commercial and add HANDS-VNOnDB training data notice
Browse files
README.md
CHANGED
|
@@ -23,7 +23,7 @@ language:
|
|
| 23 |
pipeline_tag: image-text-to-text
|
| 24 |
tags:
|
| 25 |
- vision
|
| 26 |
-
license:
|
| 27 |
---
|
| 28 |
|
| 29 |
<div align="center">
|
|
@@ -32,6 +32,13 @@ license: mit
|
|
| 32 |
|
| 33 |
## Vintern-1B-v2 βοΈ (Viet-InternVL2-1B-v2) - The LLaVA π Challenger
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
We are excited to introduce **Vintern-1B-v2** the Vietnamese π»π³ multimodal model that combines the advanced Vietnamese language model [Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct)[1] with the latest visual model, [InternViT-300M-448px](https://huggingface.co/OpenGVLab/InternViT-300M-448px)[2], CVPR 2024. This model excels in tasks such as OCR-VQA, Doc-VQA, and Chart-VQA,... With only 1 billion parameters, it is **4096 context length** finetuned from the [Viet-InternVL2-1B](https://huggingface.co/5CD-AI/Viet-InternVL2-1B) model on over 3 million specialized image-question-answer pairs for optical character recognition π, text recognition π€, document extraction π, and general VQA. The model can be integrated into various on-device applications π±, demonstrating its versatility and robust capabilities.
|
| 36 |
|
| 37 |
[**\[π€ HF Demo\]**](https://huggingface.co/spaces/khang119966/Vintern-v2-Demo)
|
|
|
|
| 23 |
pipeline_tag: image-text-to-text
|
| 24 |
tags:
|
| 25 |
- vision
|
| 26 |
+
license: cc-by-nc-4.0
|
| 27 |
---
|
| 28 |
|
| 29 |
<div align="center">
|
|
|
|
| 32 |
|
| 33 |
## Vintern-1B-v2 βοΈ (Viet-InternVL2-1B-v2) - The LLaVA π Challenger
|
| 34 |
|
| 35 |
+
> [!IMPORTANT]
|
| 36 |
+
> ### License & Training Data Notice
|
| 37 |
+
> **License:** As of November 2026, this model is released for **non-commercial use only** under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) (previously MIT). It is fine-tuned from [OpenGVLab/InternVL2-1B](https://huggingface.co/OpenGVLab/InternVL2-1B) (MIT); the copyright and license notices of the base model are retained.
|
| 38 |
+
>
|
| 39 |
+
> **Training data:** This model was trained on data derived from the **HANDS-VNOnDB** database (Nakagawa Laboratory, Tokyo University of Agriculture and Technology), through UIT-HWDB images included in [Viet-Handwriting-gemini-VQA](https://huggingface.co/datasets/5CD-AI/Viet-Handwriting-gemini-VQA). Use of this model is subject to the [HANDS-VNOnDB Conditions of Use](https://zenodo.org/records/23864366): **non-commercial purposes only**.
|
| 40 |
+
|
| 41 |
+
|
| 42 |
We are excited to introduce **Vintern-1B-v2** the Vietnamese π»π³ multimodal model that combines the advanced Vietnamese language model [Qwen2-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct)[1] with the latest visual model, [InternViT-300M-448px](https://huggingface.co/OpenGVLab/InternViT-300M-448px)[2], CVPR 2024. This model excels in tasks such as OCR-VQA, Doc-VQA, and Chart-VQA,... With only 1 billion parameters, it is **4096 context length** finetuned from the [Viet-InternVL2-1B](https://huggingface.co/5CD-AI/Viet-InternVL2-1B) model on over 3 million specialized image-question-answer pairs for optical character recognition π, text recognition π€, document extraction π, and general VQA. The model can be integrated into various on-device applications π±, demonstrating its versatility and robust capabilities.
|
| 43 |
|
| 44 |
[**\[π€ HF Demo\]**](https://huggingface.co/spaces/khang119966/Vintern-v2-Demo)
|