Image-Text-to-Text
Transformers
TensorBoard
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Instructions to use OpenGVLab/InternVL-Chat-V1-5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/InternVL-Chat-V1-5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenGVLab/InternVL-Chat-V1-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("OpenGVLab/InternVL-Chat-V1-5", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenGVLab/InternVL-Chat-V1-5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenGVLab/InternVL-Chat-V1-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": "OpenGVLab/InternVL-Chat-V1-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/OpenGVLab/InternVL-Chat-V1-5
- SGLang
How to use OpenGVLab/InternVL-Chat-V1-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 "OpenGVLab/InternVL-Chat-V1-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": "OpenGVLab/InternVL-Chat-V1-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 "OpenGVLab/InternVL-Chat-V1-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": "OpenGVLab/InternVL-Chat-V1-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 OpenGVLab/InternVL-Chat-V1-5 with Docker Model Runner:
docker model run hf.co/OpenGVLab/InternVL-Chat-V1-5
Commit History
-
Fix task name
Verified signature214aa58
-
Update README.md
Verified signature93a63ac
-
Upload folder using huggingface_hub
Verified signature1352871 -
Upload folder using huggingface_hub
Verified signature40b10d5 -
Delete runs
Verified signature1d18a1a -
Upload folder using huggingface_hub
Verified signaturee428d19
-
Update config.json
Verified signaturefdc2259
-
Update modeling_internvl_chat.py
Verified signature6561410
-
Create preprocessor_config.json
Verified signaturee822119
-
Update README.md
Verified signature7875755 -
Update README.md
Verified signature096d3da
-
Update README.md
Verified signaturec1987c5 -
Upload folder using huggingface_hub
Verified signature884f868 -
Update README.md
Verified signature2942258 -
Upload folder using huggingface_hub
Verified signature44e41e8 -
Update modeling_internlm2.py
Verified signature0fbe95a -
Update modeling_internvl_chat.py
Verified signature4076c24 -
Upload folder using huggingface_hub
Verified signature33b3cbc -
Upload folder using huggingface_hub
Verified signature5d9647a
-
Update README.md
Verified signaturea807c4a -
Delete all_results.json
Verified signatureff870df -
Update config.json
Verified signature6a9bd92 -
Update README.md
Verified signature6fee411
-
Update README.md
Verified signature449367b -
Update README.md
Verified signature10dacb0 -
Update README.md
Verified signature97d9b1a -
Upload folder using huggingface_hub
Verified signature21a393e -
Update README.md
Verified signature043cbb5
-
Update README.md
Verified signature0714743
-
Update README.md
Verified signatured68aac2 -
Update README.md
Verified signaturec7f60e9 -
Update README.md
Verified signatured119521 -
Update README.md
Verified signature3baec71 -
Update README.md
Verified signature9a723df -
Update README.md
Verified signaturef5f5234 -
Update README.md
Verified signaturef013c30 -
Update README.md
Verified signature4ef7134 -
Update README.md
Verified signaturee8f6731 -
Update README.md
Verified signature7a1621a -
Update README.md
Verified signature7a43fe8 -
Update README.md
Verified signatureb47bfb7
-
Update README.md
Verified signaturea32bf6a -
Update README.md
Verified signature6cdee17 -
Update README.md
Verified signatured650d65 -
Update README.md
Verified signaturea86d552 -
Update README.md
Verified signature1f98fd5
-
Update README.md
Verified signature8c16a21 -
Upload folder using huggingface_hub
Verified signaturea2fda74 -
Update README.md
Verified signature841877a -
initial commit
Verified signatureda1dbc3