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
Commit History
-
add AIBOM
Verified signatureDear model owner(s), We are a group of researchers investigating the usefulness of sharing AIBOMs (Artificial Intelligence Bill of Materials) to document AI models – AIBOMs are machine-readable structured lists of components (e.g., datasets and models) used to enhance transparency in AI-model supply chains. To pursue the above-mentioned objective, we identified popular models on HuggingFace and, based on your model card (and some configuration information available in HuggingFace), we generated your AIBOM according to the CyclonDX (v1.6) standard (see https://cyclonedx.org/docs/1.6/json/). AIBOMs are generated as JSON files by using the following open-source supporting tool: https://github.com/MSR4SBOM/ALOHA (technical details are available in the research paper: https://github.com/MSR4SBOM/ALOHA/blob/main/ALOHA.pdf). The JSON file in this pull request is your AIBOM (see https://github.com/MSR4SBOM/ALOHA/blob/main/documentation.json for details on its structure). Clearly, the subm…c7108f5
-
Add supports_gradient_checkpointing
Verified signature9d9aa88
-
Fix device_map
Verified signature2801a1a
-
Update README.md
Verified signature02e7994
-
Update README.md
Verified signatureb40558d
-
Apply Github PR #127 to all HF models
Verified signature859659b -
Update README.md
Verified signatured044c87
-
Update README.md
Verified signature963014e
-
fix compatibility issue for transformers 4.46+
Verified signature83e64d2
-
fix compatibility issue for transformers 4.46+
Verified signature1da41a7 -
fix compatibility issue for transformers 4.46+
Verified signature9030eca
-
Upload folder using huggingface_hub
Verified signature10a6bf4
-
Upload folder using huggingface_hub
Verified signaturee05e822 -
Upload folder using huggingface_hub
Verified signature64d1142 -
Upload folder using huggingface_hub
Verified signature5dd7763 -
Upload folder using huggingface_hub
Verified signaturee2aff1c
-
Upload folder using huggingface_hub
Verified signature17563fb -
Upload folder using huggingface_hub
Verified signature61795f0 -
Upload folder using huggingface_hub
Verified signaturee1f89bc
-
Upload folder using huggingface_hub
Verified signaturecf79149
-
Upload folder using huggingface_hub
Verified signaturec9517cc
-
Upload folder using huggingface_hub
Verified signatured170517 -
Upload folder using huggingface_hub
Verified signatureb47d2e8 -
Upload folder using huggingface_hub
Verified signature9de62f3
-
Upload folder using huggingface_hub
Verified signaturef422190 -
Upload folder using huggingface_hub
Verified signature3dae19b
-
Upload folder using huggingface_hub
Verified signature159f0ea
-
Upload folder using huggingface_hub
Verified signaturebb8f5c2
-
Upload folder using huggingface_hub
Verified signature125f7ce -
Upload folder using huggingface_hub
Verified signaturef3f4ec0
-
Update README.md
Verified signature8e7cb30
-
Upload folder using huggingface_hub
Verified signaturec35c17f -
Upload folder using huggingface_hub
Verified signaturee6434df -
Upload folder using huggingface_hub
Verified signature12d403f -
Upload folder using huggingface_hub
Verified signature6ce5764
-
Upload folder using huggingface_hub
Verified signatured067cc5 -
Upload folder using huggingface_hub
Verified signaturec85e698
-
Upload folder using huggingface_hub
Verified signatured640123 -
Upload folder using huggingface_hub
Verified signaturee779c52 -
Upload folder using huggingface_hub
Verified signaturea8040d2 -
Upload folder using huggingface_hub
Verified signature86be9d8 -
Upload folder using huggingface_hub
Verified signature42f9ca4 -
Upload folder using huggingface_hub
Verified signature7e98f54
-
Upload folder using huggingface_hub
Verified signaturec0189e3 -
Upload folder using huggingface_hub
Verified signatureb6807cb -
initial commit
Verified signature6727280