Image-Text-to-Text
Transformers
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Instructions to use OpenGVLab/InternVL2-Llama3-76B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/InternVL2-Llama3-76B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenGVLab/InternVL2-Llama3-76B", 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/InternVL2-Llama3-76B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenGVLab/InternVL2-Llama3-76B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenGVLab/InternVL2-Llama3-76B" # 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-Llama3-76B", "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-Llama3-76B
- SGLang
How to use OpenGVLab/InternVL2-Llama3-76B 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-Llama3-76B" \ --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-Llama3-76B", "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-Llama3-76B" \ --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-Llama3-76B", "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-Llama3-76B with Docker Model Runner:
docker model run hf.co/OpenGVLab/InternVL2-Llama3-76B
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -68,13 +68,15 @@ InternVL 2.0 is a multimodal large language model series, featuring models of va
|
|
| 68 |
|
| 69 |
### Video Benchmarks
|
| 70 |
|
| 71 |
-
|
|
| 72 |
-
| :------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: |
|
| 73 |
-
|
|
| 74 |
-
|
|
| 75 |
-
|
|
| 76 |
-
|
|
| 77 |
-
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
- We evaluate our models on MVBench by extracting 16 frames from each video, and each frame was resized to a 448x448 image.
|
| 80 |
|
|
@@ -486,13 +488,15 @@ InternVL 2.0 是一个多模态大语言模型系列,包含各种规模的模
|
|
| 486 |
|
| 487 |
### 视频相关评测
|
| 488 |
|
| 489 |
-
|
|
| 490 |
-
| :------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: |
|
| 491 |
-
|
|
| 492 |
-
|
|
| 493 |
-
|
|
| 494 |
-
|
|
| 495 |
-
|
|
|
|
|
|
|
|
| 496 |
|
| 497 |
- 我们通过从每个视频中提取16帧来评估我们的模型在MVBench上的性能,每个视频帧被调整为448x448的图像。
|
| 498 |
|
|
|
|
| 68 |
|
| 69 |
### Video Benchmarks
|
| 70 |
|
| 71 |
+
| Benchmark | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL2-40B | InternVL2-Llama3-76B |
|
| 72 |
+
| :-------------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: |
|
| 73 |
+
| Model Size | - | 34B | 34B | 40B | 76B |
|
| 74 |
+
| | | | | | |
|
| 75 |
+
| MVBench | - | - | - | 72.5 | 69.6 |
|
| 76 |
+
| MMBench-Video<sub>8f</sub> | 1.53 | - | - | 1.32 | 1.37 |
|
| 77 |
+
| MMBench-Video<sub>16f</sub> | 1.68 | - | - | 1.45 | 1.52 |
|
| 78 |
+
| Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TODO | TODO |
|
| 79 |
+
| Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TODO | TODO |
|
| 80 |
|
| 81 |
- We evaluate our models on MVBench by extracting 16 frames from each video, and each frame was resized to a 448x448 image.
|
| 82 |
|
|
|
|
| 488 |
|
| 489 |
### 视频相关评测
|
| 490 |
|
| 491 |
+
| 评测数据集 | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL2-40B | InternVL2-Llama3-76B |
|
| 492 |
+
| :-------------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: |
|
| 493 |
+
| 模型大小 | - | 34B | 34B | 40B | 76B |
|
| 494 |
+
| | | | | | |
|
| 495 |
+
| MVBench | - | - | - | 72.5 | 69.6 |
|
| 496 |
+
| MMBench-Video<sub>8f</sub> | 1.53 | - | - | 1.32 | 1.37 |
|
| 497 |
+
| MMBench-Video<sub>16f</sub> | 1.68 | - | - | 1.45 | 1.52 |
|
| 498 |
+
| Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TODO | TODO |
|
| 499 |
+
| Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TODO | TODO |
|
| 500 |
|
| 501 |
- 我们通过从每个视频中提取16帧来评估我们的模型在MVBench上的性能,每个视频帧被调整为448x448的图像。
|
| 502 |
|