Image-Text-to-Text
Transformers
Safetensors
English
molmo2
vision-language
multimodal
nvfp4
fp4
quantized
vllm
molmo
conversational
custom_code
8-bit precision
compressed-tensors
Instructions to use tollea1234/Molmo2-4B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tollea1234/Molmo2-4B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tollea1234/Molmo2-4B-NVFP4", 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 AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("tollea1234/Molmo2-4B-NVFP4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tollea1234/Molmo2-4B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tollea1234/Molmo2-4B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tollea1234/Molmo2-4B-NVFP4", "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/tollea1234/Molmo2-4B-NVFP4
- SGLang
How to use tollea1234/Molmo2-4B-NVFP4 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 "tollea1234/Molmo2-4B-NVFP4" \ --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": "tollea1234/Molmo2-4B-NVFP4", "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 "tollea1234/Molmo2-4B-NVFP4" \ --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": "tollea1234/Molmo2-4B-NVFP4", "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 tollea1234/Molmo2-4B-NVFP4 with Docker Model Runner:
docker model run hf.co/tollea1234/Molmo2-4B-NVFP4
Download tokenizer.json from tollea1234/Molmo2-4B-NVFP4: direct link, hf CLI and curl.
- Browser
- Download file 11.5 MB
-
https://huggingface.co/tollea1234/Molmo2-4B-NVFP4/resolve/main/tokenizer.json
- Command line
-
hf download hf://tollea1234/Molmo2-4B-NVFP4/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/tollea1234/Molmo2-4B-NVFP4/resolve/main/tokenizer.json
11.5 MB
- Xet hash:
- 3746482cb25237b57c6467f38231f0bb8f182ab8c1f1e606c290e3761d2f9742
- Size of remote file:
- 11.5 MB
- SHA256:
- 95e80901c901584f416b8fd4349fd60022774b89ba4377626511f0562cc599f7
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.