Image-Text-to-Text
Transformers
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Instructions to use kkk5/RPI-CLIP-InternVL3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kkk5/RPI-CLIP-InternVL3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="kkk5/RPI-CLIP-InternVL3-8B", 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("kkk5/RPI-CLIP-InternVL3-8B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kkk5/RPI-CLIP-InternVL3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kkk5/RPI-CLIP-InternVL3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kkk5/RPI-CLIP-InternVL3-8B", "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/kkk5/RPI-CLIP-InternVL3-8B
- SGLang
How to use kkk5/RPI-CLIP-InternVL3-8B 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 "kkk5/RPI-CLIP-InternVL3-8B" \ --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": "kkk5/RPI-CLIP-InternVL3-8B", "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 "kkk5/RPI-CLIP-InternVL3-8B" \ --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": "kkk5/RPI-CLIP-InternVL3-8B", "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 kkk5/RPI-CLIP-InternVL3-8B with Docker Model Runner:
docker model run hf.co/kkk5/RPI-CLIP-InternVL3-8B
| { | |
| "_id": "67f7f4715ede5f7cfc203287", | |
| "id": "OpenGVLab/InternVL3-8B", | |
| "private": false, | |
| "pipeline_tag": "image-text-to-text", | |
| "library_name": "transformers", | |
| "tags": [ | |
| "transformers", | |
| "safetensors", | |
| "internvl_chat", | |
| "feature-extraction", | |
| "internvl", | |
| "custom_code", | |
| "image-text-to-text", | |
| "conversational", | |
| "multilingual", | |
| "dataset:OpenGVLab/MMPR-v1.2", | |
| "arxiv:2312.14238", | |
| "arxiv:2404.16821", | |
| "arxiv:2412.05271", | |
| "arxiv:2411.10442", | |
| "arxiv:2504.10479", | |
| "arxiv:2412.09616", | |
| "base_model:OpenGVLab/InternVL3-8B-Instruct", | |
| "base_model:finetune:OpenGVLab/InternVL3-8B-Instruct", | |
| "license:apache-2.0", | |
| "region:us" | |
| ], | |
| "downloads": 207957, | |
| "likes": 62, | |
| "modelId": "OpenGVLab/InternVL3-8B", | |
| "author": "OpenGVLab", | |
| "sha": "26dcadeb50cde4369918519c760feb2946814e10", | |
| "lastModified": "2025-04-25T03:10:09.000Z", | |
| "gated": false, | |
| "disabled": false, | |
| "model-index": null, | |
| "config": { | |
| "architectures": [ | |
| "InternVLChatModel" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_internvl_chat.InternVLChatConfig", | |
| "AutoModel": "modeling_internvl_chat.InternVLChatModel", | |
| "AutoModelForCausalLM": "modeling_internvl_chat.InternVLChatModel" | |
| }, | |
| "model_type": "internvl_chat", | |
| "tokenizer_config": { | |
| "bos_token": null, | |
| "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n", | |
| "eos_token": "<|im_end|>", | |
| "pad_token": "<|endoftext|>", | |
| "unk_token": null | |
| } | |
| }, | |
| "cardData": { | |
| "license": "apache-2.0", | |
| "license_name": "qwen", | |
| "license_link": "https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE", | |
| "pipeline_tag": "image-text-to-text", | |
| "library_name": "transformers", | |
| "base_model": [ | |
| "OpenGVLab/InternVL3-8B-Instruct" | |
| ], | |
| "base_model_relation": "finetune", | |
| "datasets": [ | |
| "OpenGVLab/MMPR-v1.2" | |
| ], | |
| "language": [ | |
| "multilingual" | |
| ], | |
| "tags": [ | |
| "internvl", | |
| "custom_code" | |
| ] | |
| }, | |
| "transformersInfo": { | |
| "auto_model": "AutoModel", | |
| "custom_class": "modeling_internvl_chat.InternVLChatModel", | |
| "pipeline_tag": "feature-extraction" | |
| }, | |
| "siblings": [ | |
| { | |
| "rfilename": ".gitattributes" | |
| }, | |
| { | |
| "rfilename": "README.md" | |
| }, | |
| { | |
| "rfilename": "added_tokens.json" | |
| }, | |
| { | |
| "rfilename": "config.json" | |
| }, | |
| { | |
| "rfilename": "configuration_intern_vit.py" | |
| }, | |
| { | |
| "rfilename": "configuration_internvl_chat.py" | |
| }, | |
| { | |
| "rfilename": "conversation.py" | |
| }, | |
| { | |
| "rfilename": "examples/image1.jpg" | |
| }, | |
| { | |
| "rfilename": "examples/image2.jpg" | |
| }, | |
| { | |
| "rfilename": "examples/red-panda.mp4" | |
| }, | |
| { | |
| "rfilename": "generation_config.json" | |
| }, | |
| { | |
| "rfilename": "merges.txt" | |
| }, | |
| { | |
| "rfilename": "model-00001-of-00004.safetensors" | |
| }, | |
| { | |
| "rfilename": "model-00002-of-00004.safetensors" | |
| }, | |
| { | |
| "rfilename": "model-00003-of-00004.safetensors" | |
| }, | |
| { | |
| "rfilename": "model-00004-of-00004.safetensors" | |
| }, | |
| { | |
| "rfilename": "model.safetensors.index.json" | |
| }, | |
| { | |
| "rfilename": "modeling_intern_vit.py" | |
| }, | |
| { | |
| "rfilename": "modeling_internvl_chat.py" | |
| }, | |
| { | |
| "rfilename": "preprocessor_config.json" | |
| }, | |
| { | |
| "rfilename": "special_tokens_map.json" | |
| }, | |
| { | |
| "rfilename": "tokenizer.json" | |
| }, | |
| { | |
| "rfilename": "tokenizer_config.json" | |
| }, | |
| { | |
| "rfilename": "vocab.json" | |
| } | |
| ], | |
| "spaces": [ | |
| "TIGER-Lab/MEGA-Bench", | |
| "developer0hye/InternVL3-8B" | |
| ], | |
| "createdAt": "2025-04-10T16:40:17.000Z", | |
| "safetensors": { | |
| "parameters": { | |
| "BF16": 7944373760 | |
| }, | |
| "total": 7944373760 | |
| }, | |
| "usedStorage": 15890824813 | |
| } |