Image-Text-to-Text
Transformers
Safetensors
English
molmo2
multimodal
olmo
molmo
conversational
custom_code
Instructions to use allenai/Molmo2-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/Molmo2-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="allenai/Molmo2-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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("allenai/Molmo2-8B", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("allenai/Molmo2-8B", trust_remote_code=True, device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use allenai/Molmo2-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "allenai/Molmo2-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": "allenai/Molmo2-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/allenai/Molmo2-8B
- SGLang
How to use allenai/Molmo2-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 "allenai/Molmo2-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": "allenai/Molmo2-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 "allenai/Molmo2-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": "allenai/Molmo2-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 allenai/Molmo2-8B with Docker Model Runner:
docker model run hf.co/allenai/Molmo2-8B
Commit History
-
Update README.md
Verified signaturee28fa28
-
Update README.md (#2)
Verified signature- Update README.md (211100b4d11e782ed3156498d5e11dda8cd9f239)0df20bf -
Update README.md
Verified signature72185cc
-
Update README.md
Verified signature389c684 -
Update README.md
Verified signature25c883b -
Delete MainFig_WIP_8.png
Verified signature9a7c96c -
Update README.md
Verified signature4ff388a -
highlight specific model
Verified signature292ed51 -
update license
Verified signatureacff1d3 -
Add multi image pointing
Verified signature59403f8 -
Add tracking example
Verified signatureef4c117 -
add pointing and general QA examples
Verified signatureec6e58f
-
Update README.md
Verified signature1b4ced5 -
Update README.md
Verified signature38e9b34 -
upload main capability image
Verified signature2fc09ef -
Update README.md
Verified signature8d9af77 -
Create README.md
Verified signature<img src="molmo_2_logo_RGB.png" alt="Logo for the Molmo2 Project" style="width: auto; height: 50px;"> # Molmo2 8B Molmo2 is a family of open vision-language models developed by the Allen Institute for AI (Ai2). Molmo2 models are trained on Molmo2 data, a dataset of highly-curated video-text pairs. It has state-of-the-art performance among multimodal models with a similar size while being fully open-source. You can find all models in the Molmo2 family [here](https://huggingface.co/collections/allenai/molmo2). **Learn more** about the Molmo2 family [in our announcement blog post](http://allenai.org/news/molmo2) Molmo2 8B is based on Qwen3-8B and uses SIGLIP2 as vision backbone. It outperforms others in the class of open weight and data models on short videos, counting, and captioning, and is competitive on long-videos. On video-grounding Molmo2 outperforms larger proprietary models, including 32.9% (Molmo2) vs 17% (Gemini 2.5 Pro) on video pointing. Try it here! - Ai2 is commited …c0c2b8f -
Upload molmo_2_logo_RGB.png
Verified signatureLogo for the READMEdb8d279
-
Upload Molmo2-8B
Verified signature2d4f65a -
initial commit
Verified signature97369a1