Image-Text-to-Text
Transformers
TensorBoard
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Instructions to use OpenGVLab/InternVL2_5-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/InternVL2_5-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OpenGVLab/InternVL2_5-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("OpenGVLab/InternVL2_5-8B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OpenGVLab/InternVL2_5-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenGVLab/InternVL2_5-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": "OpenGVLab/InternVL2_5-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/OpenGVLab/InternVL2_5-8B
- SGLang
How to use OpenGVLab/InternVL2_5-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 "OpenGVLab/InternVL2_5-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": "OpenGVLab/InternVL2_5-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 "OpenGVLab/InternVL2_5-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": "OpenGVLab/InternVL2_5-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 OpenGVLab/InternVL2_5-8B with Docker Model Runner:
docker model run hf.co/OpenGVLab/InternVL2_5-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -50,22 +50,6 @@ InternVL 2.5 is a multimodal large language model series, featuring models of va
|
|
| 50 |
|
| 51 |
## Performance
|
| 52 |
|
| 53 |
-
Here is the converted table in Markdown with the rows and columns swapped and the `\cite{}` references removed:
|
| 54 |
-
|
| 55 |
-
| Metric | Ovis1.6-Gemma2-9B | MiniCPM-V2.6 | Qwen2-VL-7B | InternVL2-8B | InternVL2.5-8B |
|
| 56 |
-
|-------------|-------------------|--------------------|--------------------|--------------------|---------------------|
|
| 57 |
-
| **\MMMU** | 55.0 | 49.8 | 54.1 | 52.6 | 56.0 |
|
| 58 |
-
| **\MMMUT** | -- | -- | -- | 44.3 | 48.9 |
|
| 59 |
-
| **\MMMUPRO** | -- | 30.2 / 24.2 / 27.2 | 34.1 / 27.0 / 30.5 | 32.5 / 25.4 / 29.0 | 38.2 / 30.4 / 34.3 |
|
| 60 |
-
| **\MathVista** | 67.2 | 60.6 | 58.2 | 58.3 | 64.4 |
|
| 61 |
-
| **\MathVision** | \rsp / 18.8 | 16.1 / 17.5 | 22.0 / 16.3 | 20.4 / 18.4 | 22.0 / 19.7 |
|
| 62 |
-
| **\MathVe** | -- | 25.7 | 31.9 | 37.0 | 39.5 |
|
| 63 |
-
| **\Olympiad** | -- | -- | -- | 1.9 | 4.9 |
|
| 64 |
-
|
| 65 |
-
**Notes:**
|
| 66 |
-
- The commented-out line for `Molmo-7B-D` has been removed.
|
| 67 |
-
- The `\rowcolor{gray!15}` command is omitted as Markdown does not support row coloring.
|
| 68 |
-
- Ensure that any custom LaTeX commands like `\rsp` are properly defined or replaced if necessary in your Markdown renderer.
|
| 69 |
|
| 70 |
### Image Benchmarks
|
| 71 |
|
|
|
|
| 50 |
|
| 51 |
## Performance
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
### Image Benchmarks
|
| 55 |
|