Image-Text-to-Text
Transformers
Safetensors
PyTorch
English
NVLM_D
nvidia
NVLM
multimodal
conversational
custom_code
Instructions to use nvidia/NVLM-D-72B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/NVLM-D-72B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="nvidia/NVLM-D-72B", 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 NVLM_D model = NVLM_D.from_pretrained("nvidia/NVLM-D-72B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/NVLM-D-72B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nvidia/NVLM-D-72B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nvidia/NVLM-D-72B", "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/nvidia/NVLM-D-72B
- SGLang
How to use nvidia/NVLM-D-72B 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 "nvidia/NVLM-D-72B" \ --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": "nvidia/NVLM-D-72B", "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 "nvidia/NVLM-D-72B" \ --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": "nvidia/NVLM-D-72B", "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 nvidia/NVLM-D-72B with Docker Model Runner:
docker model run hf.co/nvidia/NVLM-D-72B
Commit History
-
Upload Notice.txt
Verified signature11e9e0f -
Update README.md
Verified signature4e2ec6f
-
Add benchmark evaluation scripts
boxinw@nvidia.comb925209
-
Add training code link
boxinw@nvidia.com07a7f16
-
Fix example code on README.md (#21)
Verified signature- Fix example code on README.md (c4fe18c4102abe2f1b6720f60ea27e1d51a74b3a) Co-authored-by: Siri Thammarerkrit <iristun@users.noreply.huggingface.co>5a57d92
-
Update README
boxinw@nvidia.com32d8bf4
-
Add ethical considerations
boxinw@nvidia.com1171108
-
convert to safetensors
boxinw@nvidia.com8510b10 -
Adding `safetensors` variant of this model (#16)
Verified signature- Adding `safetensors` variant of this model (f7f14e802e4c977e5ce826e785b967a214da9adc) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>ca656c5
-
Update readme
boxinw@nvidia.comb988ade
-
Add text only results
boxinw@nvidia.com732e074
-
Add `transformers` as library_name (#2)
Verified signature- Add `transformers` as library_name (e258e31dcec9959ea4f9e4d63f5079111d664e22) Co-authored-by: Lucain Pouget <Wauplin@users.noreply.huggingface.co>9cf8c9e -
Update pipeline tag (#1)
Verified signature- Update pipeline tag (9857e36e2da9081deb6c34b540dafdbcf57c77f8) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>1c71055 -
update tag
boxinw@nvidia.comb942c1e -
update tag
boxinw@nvidia.comf220154 -
Add logo
boxinw@nvidia.com2cebe7f -
Update readme
boxinw@nvidia.comdad27a5 -
Update readme
boxinw@nvidia.comebd553d -
Uploading code
boxinw@nvidia.com2cebb4b
-
Uploading checkpoints, tokenizers, and license
boxinw@nvidia.com0e2e85d -
initial commit
Verified signaturea9f1279