Image-Text-to-Text
Transformers
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Instructions to use OpenGVLab/InternVL2-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/InternVL2-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenGVLab/InternVL2-2B", 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("OpenGVLab/InternVL2-2B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OpenGVLab/InternVL2-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenGVLab/InternVL2-2B" # 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/InternVL2-2B", "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/InternVL2-2B
- SGLang
How to use OpenGVLab/InternVL2-2B 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/InternVL2-2B" \ --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/InternVL2-2B", "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/InternVL2-2B" \ --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/InternVL2-2B", "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/InternVL2-2B with Docker Model Runner:
docker model run hf.co/OpenGVLab/InternVL2-2B
Delete retrieval-image-test-long-subset
Browse files- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/0_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -39
- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/1_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -0
- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/2_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -0
- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/3_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -0
- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/4_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -0
- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/5_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -0
- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/6_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -0
- retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/7_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl +0 -0
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/0_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
{"question_id": 13, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "A", "context_length": 129016, "placed_depth": [0.37], "correct": false}
|
| 2 |
-
{"question_id": 182, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "A", "context_length": 132624, "placed_depth": [0.19], "correct": false}
|
| 3 |
-
{"question_id": 37, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 134979, "placed_depth": [0.56], "correct": true}
|
| 4 |
-
{"question_id": 38, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 136129, "placed_depth": [0.62], "correct": true}
|
| 5 |
-
{"question_id": 115, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 137312, "placed_depth": [0.53], "correct": false}
|
| 6 |
-
{"question_id": 110, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "A", "context_length": 139959, "placed_depth": [0.19], "correct": false}
|
| 7 |
-
{"question_id": 198, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 141105, "placed_depth": [0.68], "correct": false}
|
| 8 |
-
{"question_id": 0, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 143894, "placed_depth": [0.8], "correct": false}
|
| 9 |
-
{"question_id": 2, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "A", "context_length": 144229, "placed_depth": [0.56], "correct": false}
|
| 10 |
-
{"question_id": 97, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 144757, "placed_depth": [0.85], "correct": false}
|
| 11 |
-
{"question_id": 140, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "A", "context_length": 147187, "placed_depth": [0.34], "correct": false}
|
| 12 |
-
{"question_id": 162, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 1, "response": "A", "context_length": 147566, "placed_depth": [0.34], "correct": false}
|
| 13 |
-
{"question_id": 6, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 150899, "placed_depth": [0.68], "correct": true}
|
| 14 |
-
{"question_id": 170, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 152483, "placed_depth": [0.66], "correct": true}
|
| 15 |
-
{"question_id": 85, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 153239, "placed_depth": [0.61], "correct": false}
|
| 16 |
-
{"question_id": 152, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 156848, "placed_depth": [0.81], "correct": true}
|
| 17 |
-
{"question_id": 175, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "C", "context_length": 157189, "placed_depth": [0.61], "correct": false}
|
| 18 |
-
{"question_id": 36, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 158662, "placed_depth": [0.44], "correct": true}
|
| 19 |
-
{"question_id": 86, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 160851, "placed_depth": [0.48], "correct": false}
|
| 20 |
-
{"question_id": 188, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 1, "response": "A", "context_length": 161547, "placed_depth": [0.8], "correct": false}
|
| 21 |
-
{"question_id": 26, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 1, "response": "A", "context_length": 161828, "placed_depth": [0.68], "correct": false}
|
| 22 |
-
{"question_id": 108, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 162732, "placed_depth": [0.63], "correct": true}
|
| 23 |
-
{"question_id": 60, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 164264, "placed_depth": [0.37], "correct": false}
|
| 24 |
-
{"question_id": 158, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "A", "context_length": 165746, "placed_depth": [0.34], "correct": false}
|
| 25 |
-
{"question_id": 32, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 166015, "placed_depth": [0.3], "correct": false}
|
| 26 |
-
{"question_id": 133, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 168516, "placed_depth": [0.28], "correct": true}
|
| 27 |
-
{"question_id": 20, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 169481, "placed_depth": [0.54], "correct": false}
|
| 28 |
-
{"question_id": 19, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 171350, "placed_depth": [0.54], "correct": true}
|
| 29 |
-
{"question_id": 50, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 171687, "placed_depth": [0.34], "correct": true}
|
| 30 |
-
{"question_id": 54, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 172803, "placed_depth": [0.41], "correct": true}
|
| 31 |
-
{"question_id": 120, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 3, "response": "A", "context_length": 179356, "placed_depth": [0.54], "correct": false}
|
| 32 |
-
{"question_id": 186, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 179914, "placed_depth": [0.81], "correct": true}
|
| 33 |
-
{"question_id": 79, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 180310, "placed_depth": [0.34], "correct": true}
|
| 34 |
-
{"question_id": 168, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 181899, "placed_depth": [0.62], "correct": true}
|
| 35 |
-
{"question_id": 92, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 182958, "placed_depth": [0.51], "correct": true}
|
| 36 |
-
{"question_id": 138, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 185535, "placed_depth": [0.88], "correct": false}
|
| 37 |
-
{"question_id": 31, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 185810, "placed_depth": [0.35], "correct": false}
|
| 38 |
-
{"question_id": 151, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 0, "response": "A", "context_length": 187708, "placed_depth": [0.32], "correct": true}
|
| 39 |
-
{"question_id": 96, "question": "Which of the following images appears in a certain image of the above document?\nA. <image>\nB. <image>\nC. <image>\nD. <image>\nAnswer with the option's letter from the given choices directly.", "answer": 2, "response": "A", "context_length": 190022, "placed_depth": [0.46], "correct": false}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/1_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
File without changes
|
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/2_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
File without changes
|
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/3_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
File without changes
|
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/4_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
File without changes
|
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/5_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
File without changes
|
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/6_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
File without changes
|
retrieval-image-test-long-subset/temp_InternVL2-2B_retrieval-image-test-long-subset/7_8_InternVL2-2B_retrieval-image-test-long-subset_ring_attn.jsonl
DELETED
|
File without changes
|