Image-Text-to-Text
Transformers
Safetensors
English
molmo
text-generation
multimodal
olmo
pixmo
conversational
custom_code
Instructions to use allenai/Molmo-7B-D-0924 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/Molmo-7B-D-0924 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="allenai/Molmo-7B-D-0924", 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)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("allenai/Molmo-7B-D-0924", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use allenai/Molmo-7B-D-0924 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "allenai/Molmo-7B-D-0924" # 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/Molmo-7B-D-0924", "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/Molmo-7B-D-0924
- SGLang
How to use allenai/Molmo-7B-D-0924 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/Molmo-7B-D-0924" \ --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/Molmo-7B-D-0924", "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/Molmo-7B-D-0924" \ --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/Molmo-7B-D-0924", "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/Molmo-7B-D-0924 with Docker Model Runner:
docker model run hf.co/allenai/Molmo-7B-D-0924
[Transformers V5] AttributeError: 'MolmoForCausalLM' object has no attribute 'all_tied_weights_keys'
#51 opened 2 months ago
by
xinhe
Update modeling_molmo to work with transformers 4.56.2
β€οΈπ 2
2
#50 opened 8 months ago
by
mlopezantequera
chat-templates
#49 opened 8 months ago
by
XR
Error when running demo 1 to 1
5
#48 opened 10 months ago
by
nikolaset
Deleted convert_to_hf.py
#46 opened 12 months ago
by
jdwillard19
Update modeling_molmo.py
#45 opened about 1 year ago
by
Kumadao
Modelling class mistakenly requires tensorflow
1
#44 opened about 1 year ago
by
merlerm
How to format point data?
#42 opened about 1 year ago
by
jtattershall
Update modeling_molmo.py
π 9
1
#41 opened over 1 year ago
by
ctranslate2-4you
Remove In-place operations
#40 opened over 1 year ago
by
yyyyifan
Increasing context length for language input
β€οΈ 1
1
#39 opened over 1 year ago
by
chrishoertnagl
Add HF Chat template
π 1
1
#38 opened over 1 year ago
by
anvdn
Multi-turn Chat History Management
2
#37 opened over 1 year ago
by
Jaykumaran17
Do you support multi-turn conversations?
5
#36 opened over 1 year ago
by
whopeople
Beam search functionality?
1
#35 opened over 1 year ago
by
adhiraj1998
Multi-image input support
4
#34 opened over 1 year ago
by
cynricfu
How should I extract attention maps? Can you provide a specific example?
5
#33 opened over 1 year ago
by
whopeople
force json output
1
#32 opened over 1 year ago
by
joa23
How to finetune using DPO?
7
#31 opened over 1 year ago
by
Maverick17
Create handler.py
2
#29 opened over 1 year ago
by
shrijayan
Any plans on when vllm will be supported?
8
#26 opened over 1 year ago
by
karlyukang
Image size versus inference speed/accuracy
π 3
3
#22 opened over 1 year ago
by
logankeenan
Apple Silicon not running with device type mps and acceleration
6
#21 opened over 1 year ago
by
Troubadix
Use Molmo vision encoder for classification.
βπ 5
#20 opened over 1 year ago
by
shafeeq007
how to use the annotation mode
1
#15 opened over 1 year ago
by
mehmetsat
Finetuning script for Molmo
π 5
2
#14 opened over 1 year ago
by
2U1
batch inference supported?
π 1
7
#7 opened over 1 year ago
by
chenkq
Could you let me know when the bfloat16 model will be uploaded? I can't run the float32 model!
8
#5 opened over 1 year ago
by
Cach
Molmo-7B-D-0924 OOM on A100 80GB using Quick Start code
β 1
5
#1 opened over 1 year ago
by
sasawq21