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
Update README.md
Browse files
README.md
CHANGED
|
@@ -58,7 +58,7 @@ InternVL 2.0 is a multimodal large language model series, featuring models of va
|
|
| 58 |
| SEED-Image | 77.1 | - | 78.2 | 78.2 |
|
| 59 |
| HallBench<sub>avg</sub> | 55.0 | 49.9 | 56.9 | 55.2 |
|
| 60 |
| MathVista<sub>testmini</sub> | 63.8 | 67.7 | 63.7 | 65.5 |
|
| 61 |
-
| OpenCompass<sub>avg</sub> | 69.9 | 67.9 | 69.7 |
|
| 62 |
|
| 63 |
- We simultaneously use InternVL and VLMEvalKit repositories for model evaluation. Specifically, the results reported for DocVQA, ChartQA, InfoVQA, TextVQA, MME, AI2D, MMBench, CCBench, MMVet, and SEED-Image were tested using the InternVL repository. OCRBench, RealWorldQA, HallBench, and MathVista were evaluated using the VLMEvalKit.
|
| 64 |
|
|
@@ -478,7 +478,7 @@ InternVL 2.0 是一个多模态大语言模型系列,包含各种规模的模
|
|
| 478 |
| SEED-Image | 77.1 | - | 78.2 | 78.2 |
|
| 479 |
| HallBench<sub>avg</sub> | 55.0 | 49.9 | 56.9 | 55.2 |
|
| 480 |
| MathVista<sub>testmini</sub> | 63.8 | 67.7 | 63.7 | 65.5 |
|
| 481 |
-
| OpenCompass<sub>avg</sub> | 69.9 | 67.9 | 69.7 |
|
| 482 |
|
| 483 |
- 我们同时使用 InternVL 和 VLMEvalKit 仓库进行模型评估。具体来说,DocVQA、ChartQA、InfoVQA、TextVQA、MME、AI2D、MMBench、CCBench、MMVet 和 SEED-Image 的结果是使用 InternVL 仓库测试的。OCRBench、RealWorldQA、HallBench 和 MathVista 是使用 VLMEvalKit 进行评估的。
|
| 484 |
|
|
|
|
| 58 |
| SEED-Image | 77.1 | - | 78.2 | 78.2 |
|
| 59 |
| HallBench<sub>avg</sub> | 55.0 | 49.9 | 56.9 | 55.2 |
|
| 60 |
| MathVista<sub>testmini</sub> | 63.8 | 67.7 | 63.7 | 65.5 |
|
| 61 |
+
| OpenCompass<sub>avg</sub> | 69.9 | 67.9 | 69.7 | 71.0 |
|
| 62 |
|
| 63 |
- We simultaneously use InternVL and VLMEvalKit repositories for model evaluation. Specifically, the results reported for DocVQA, ChartQA, InfoVQA, TextVQA, MME, AI2D, MMBench, CCBench, MMVet, and SEED-Image were tested using the InternVL repository. OCRBench, RealWorldQA, HallBench, and MathVista were evaluated using the VLMEvalKit.
|
| 64 |
|
|
|
|
| 478 |
| SEED-Image | 77.1 | - | 78.2 | 78.2 |
|
| 479 |
| HallBench<sub>avg</sub> | 55.0 | 49.9 | 56.9 | 55.2 |
|
| 480 |
| MathVista<sub>testmini</sub> | 63.8 | 67.7 | 63.7 | 65.5 |
|
| 481 |
+
| OpenCompass<sub>avg</sub> | 69.9 | 67.9 | 69.7 | 71.0 |
|
| 482 |
|
| 483 |
- 我们同时使用 InternVL 和 VLMEvalKit 仓库进行模型评估。具体来说,DocVQA、ChartQA、InfoVQA、TextVQA、MME、AI2D、MMBench、CCBench、MMVet 和 SEED-Image 的结果是使用 InternVL 仓库测试的。OCRBench、RealWorldQA、HallBench 和 MathVista 是使用 VLMEvalKit 进行评估的。
|
| 484 |
|