Image-Text-to-Text
Transformers
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Run this model with HF Jobs
Run OpenGVLab/InternVL2-Llama3-76B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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 files67 unmodified lines68697071727374757677787980405 unmodified lines48648748848949049149249349449549649749867 unmodified lines### Video Benchmarks| Benchmark | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL2-40B | InternVL2-Llama3-76B || :------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: || Model Size | - | 34B | 34B | 40B | 76B || | | | | | || MVBench | - | - | - | 72.5 | 69.6 || Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TODO | TODO || Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TODO | TODO |- We evaluate our models on MVBench by extracting 16 frames from each video, and each frame was resized to a 448x448 image.405 unmodified lines### 视频相关评测| 评测数据集 | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL2-40B | InternVL2-Llama3-76B || :------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: || 模型大小 | - | 34B | 34B | 40B | 76B || | | | | | || MVBench | - | - | - | 72.5 | 69.6 || Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TODO | TODO || Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TODO | TODO |- 我们通过从每个视频中提取16帧来评估我们的模型在MVBench上的性能,每个视频帧被调整为448x448的图像。67 unmodified lines686970717273747576777879808182405 unmodified lines48848949049149249349449549649749849950050150267 unmodified lines### Video Benchmarks| Benchmark | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL2-40B | InternVL2-Llama3-76B || :-------------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: || Model Size | - | 34B | 34B | 40B | 76B || | | | | | || MVBench | - | - | - | 72.5 | 69.6 || MMBench-Video<sub>8f</sub> | 1.53 | - | - | 1.32 | 1.37 || MMBench-Video<sub>16f</sub> | 1.68 | - | - | 1.45 | 1.52 || Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TODO | TODO || Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TODO | TODO |- We evaluate our models on MVBench by extracting 16 frames from each video, and each frame was resized to a 448x448 image.405 unmodified lines### 视频相关评测| 评测数据集 | GPT-4V | VILA-1.5 | LLaVA-NeXT-Video | InternVL2-40B | InternVL2-Llama3-76B || :-------------------------: | :----: | :------: | :--------------: | :-----------: | :------------------: || 模型大小 | - | 34B | 34B | 40B | 76B || | | | | | || MVBench | - | - | - | 72.5 | 69.6 || MMBench-Video<sub>8f</sub> | 1.53 | - | - | 1.32 | 1.37 || MMBench-Video<sub>16f</sub> | 1.68 | - | - | 1.45 | 1.52 || Video-MME<br>wo subs | 59.9 | 59.0 | 52.0 | TODO | TODO || Video-MME<br>w/ subs | 63.3 | 59.4 | 54.9 | TODO | TODO |- 我们通过从每个视频中提取16帧来评估我们的模型在MVBench上的性能,每个视频帧被调整为448x448的图像。
README.md+18-14