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
Commit History
-
fix task tag
Verified signaturee11cce0
-
Update README.md
Verified signature2a26621
-
Update README.md
Verified signature0fce955 -
Update README.md
Verified signature3d4f067
-
Update README.md
Verified signature09a6727
-
Update README.md
Verified signaturee5d8ed3 -
Update README.md
Verified signaturee452509 -
Update README.md
Verified signature7bea5e4
-
Update README.md
Verified signature78869f1
-
Update README.md
Verified signaturec260487
-
Update README.md
Verified signature4799099
-
Update README.md
Verified signaturec4cb64d -
Upload 6.png
Verified signature2b4ec52 -
Update README.md
Verified signature001b043 -
Update README.md
Verified signaturef8264ee -
Update README.md
Verified signature518d102
-
Update README.md
Verified signaturea0528e1 -
Update README.md
Verified signaturedf16fb9 -
Update README.md
Verified signature586258c -
Update README.md
Verified signature4c6191d -
Update README.md
Verified signaturebae6882 -
Update README.md
Verified signatured2d9a3a -
Delete 5.jpg
Verified signature411c6df -
Upload 5.jpg
Verified signature4d38cb5 -
Update README.md
Verified signature61dc075 -
Upload 5.jpg
Verified signature8a5292f -
Update README.md
Verified signatureeaa1215 -
Upload 4 files
Verified signaturebb48b4f -
Update README.md
Verified signatureb8f5ed0 -
Update README.md
Verified signaturec38c780 -
Update README.md
Verified signature0e819ae -
Update README.md
Verified signature90f4809 -
Update README.md
Verified signature37f825a -
Update README.md
Verified signature00f78b0 -
Update README.md
Verified signatureeadb7e9 -
Update README.md
Verified signature5ec0053 -
Update README.md
Verified signature9c550b7 -
Update README.md
Verified signature68e1e79 -
Update README.md
Verified signature87dbe75 -
Upload Vintern_logo.png
Verified signaturedfe03a7 -
Upload 5 files
Verified signature6eb49dc -
Update config.json
Verified signature3eed975 -
Upload tokenizer
Verified signature69aed7c -
Upload model
Verified signature091f1a3 -
initial commit
Verified signatured0f3a66