Image-Text-to-Text
Transformers
Safetensors
English
molmo
text-generation
multimodal
olmo
pixmo
conversational
custom_code
Instructions to use 1024m/Molmo-7B-D-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 1024m/Molmo-7B-D-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="1024m/Molmo-7B-D-Base", 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 AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("1024m/Molmo-7B-D-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 1024m/Molmo-7B-D-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "1024m/Molmo-7B-D-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "1024m/Molmo-7B-D-Base", "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/1024m/Molmo-7B-D-Base
- SGLang
How to use 1024m/Molmo-7B-D-Base 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 "1024m/Molmo-7B-D-Base" \ --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": "1024m/Molmo-7B-D-Base", "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 "1024m/Molmo-7B-D-Base" \ --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": "1024m/Molmo-7B-D-Base", "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 1024m/Molmo-7B-D-Base with Docker Model Runner:
docker model run hf.co/1024m/Molmo-7B-D-Base
Commit History
-
Upload vocab.json with huggingface_hub
Verified signaturef0f192d -
Upload tokenizer_config.json with huggingface_hub
Verified signature82acc03 -
Upload tokenizer.json with huggingface_hub
Verified signature8688b64 -
Upload special_tokens_map.json with huggingface_hub
Verified signature2808f01 -
Upload processor_config.json with huggingface_hub
Verified signature13482ee -
Upload preprocessor_config.json with huggingface_hub
Verified signature0ee696b -
Upload preprocessing_molmo.py with huggingface_hub
Verified signature152ee01 -
Upload molmo_logo.png with huggingface_hub
Verified signature13cce59 -
Upload modeling_molmo.py with huggingface_hub
Verified signature297efeb -
Upload model.safetensors.index.json with huggingface_hub
Verified signaturef57712d -
Upload model-00007-of-00007.safetensors with huggingface_hub
Verified signature344200d -
Upload model-00006-of-00007.safetensors with huggingface_hub
Verified signature911bcf1 -
Upload model-00005-of-00007.safetensors with huggingface_hub
Verified signaturea99908f -
Upload model-00004-of-00007.safetensors with huggingface_hub
Verified signaturebcfc880 -
Upload model-00003-of-00007.safetensors with huggingface_hub
Verified signaturef899628 -
Upload model-00002-of-00007.safetensors with huggingface_hub
Verified signature6be4014 -
Upload model-00001-of-00007.safetensors with huggingface_hub
Verified signature150a9d5 -
Upload merges.txt with huggingface_hub
Verified signature030000c -
Upload image_preprocessing_molmo.py with huggingface_hub
Verified signatured98df3d -
Upload generation_config.json with huggingface_hub
Verified signature5d343f8 -
Upload config_molmo.py with huggingface_hub
Verified signaturede9d214 -
Upload config.json with huggingface_hub
Verified signature857037e -
Upload added_tokens.json with huggingface_hub
Verified signaturecc3811a -
Upload README.md with huggingface_hub
Verified signaturede6c693 -
initial commit
Verified signatureaca994a