Image-Text-to-Text
Transformers
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Instructions to use OpenGVLab/InternVL2-26B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/InternVL2-26B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenGVLab/InternVL2-26B", 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-26B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OpenGVLab/InternVL2-26B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenGVLab/InternVL2-26B" # 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-26B", "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-26B
- SGLang
How to use OpenGVLab/InternVL2-26B 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-26B" \ --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-26B", "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-26B" \ --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-26B", "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-26B with Docker Model Runner:
docker model run hf.co/OpenGVLab/InternVL2-26B
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -55,13 +55,13 @@ InternVL 2.0 is a multimodal large language model series, featuring models of va
|
|
| 55 |
|
| 56 |
### Video Benchmarks
|
| 57 |
|
| 58 |
-
|
|
| 59 |
-
| :------------------
|
| 60 |
-
|
|
| 61 |
-
|
|
| 62 |
-
|
|
| 63 |
-
| Video-MME<
|
| 64 |
-
| Video-MME<
|
| 65 |
|
| 66 |
- We evaluate our models on MVBench by extracting 16 frames from each video, and each frame was resized to a 448x448 image.
|
| 67 |
|
|
@@ -468,13 +468,13 @@ InternVL 2.0 是一个多模态大语言模型系列,包含各种规模的模
|
|
| 468 |
|
| 469 |
### 视频相关评测
|
| 470 |
|
| 471 |
-
|
|
| 472 |
-
| :------------------
|
| 473 |
-
|
|
| 474 |
-
|
|
| 475 |
-
|
|
| 476 |
-
| Video-MME<
|
| 477 |
-
| Video-MME<
|
| 478 |
|
| 479 |
- 我们通过从每个视频中提取16帧来评估我们的模型在MVBench上的性能,每个视频帧被调整为448x448的图像。
|
| 480 |
|
|
|
|
| 55 |
|
| 56 |
### Video Benchmarks
|
| 57 |
|
| 58 |
+
| Benchmark | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL-Chat-V1-5 | InternVL2-26B |
|
| 59 |
+
| :------------------: | :----: | :------: | :--------------: | :----------------: | :-----------: |
|
| 60 |
+
| Model Size | - | 34B | 34B | 25.5B | 25.5B |
|
| 61 |
+
| | | | | | |
|
| 62 |
+
| MVBench | - | - | - | 52.1 | 67.5 |
|
| 63 |
+
| Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TBD | TBD |
|
| 64 |
+
| Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TBD | TBD |
|
| 65 |
|
| 66 |
- We evaluate our models on MVBench by extracting 16 frames from each video, and each frame was resized to a 448x448 image.
|
| 67 |
|
|
|
|
| 468 |
|
| 469 |
### 视频相关评测
|
| 470 |
|
| 471 |
+
| 评测数据集 | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL-Chat-V1-5 | InternVL2-26B |
|
| 472 |
+
| :------------------: | :----: | :------: | :--------------: | :----------------: | :-----------: |
|
| 473 |
+
| 模型大小 | - | 34B | 34B | 25.5B | 25.5B |
|
| 474 |
+
| | | | | | |
|
| 475 |
+
| MVBench | - | - | - | 52.1 | 67.5 |
|
| 476 |
+
| Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TBD | TBD |
|
| 477 |
+
| Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TBD | TBD |
|
| 478 |
|
| 479 |
- 我们通过从每个视频中提取16帧来评估我们的模型在MVBench上的性能,每个视频帧被调整为448x448的图像。
|
| 480 |
|