Instructions to use ravilution/MolmoWeb-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ravilution/MolmoWeb-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ravilution/MolmoWeb-4B", 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 AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("ravilution/MolmoWeb-4B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ravilution/MolmoWeb-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ravilution/MolmoWeb-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ravilution/MolmoWeb-4B", "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/ravilution/MolmoWeb-4B
- SGLang
How to use ravilution/MolmoWeb-4B 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 "ravilution/MolmoWeb-4B" \ --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": "ravilution/MolmoWeb-4B", "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 "ravilution/MolmoWeb-4B" \ --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": "ravilution/MolmoWeb-4B", "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 ravilution/MolmoWeb-4B with Docker Model Runner:
docker model run hf.co/ravilution/MolmoWeb-4B
ravilution/MolmoWeb-4B
This is a full-precision Hugging Face– and vLLM-compatible release of allenai/MolmoWeb-4B, a vision-based web agent model by Ai2 capable of navigating and interacting with web browsers.
It follows the same idea as ravilution/MolmoWeb-8B-8bit-mlx: a personal Hub copy with a clear description and practical loading notes—here for the 4B dense checkpoint rather than an MLX quantization.
Note: This is a 4B parameter model (four
safetensorsshards). A few post-download patches were applied locally so tokenization and generation metadata match what downstream stacks (including vLLM) expect:eos_token_id/bos_token_id/pad_token_id,transformers_versioninconfig.jsonandgeneration_config.json, and the tokenizer pretokenizer regex (Mistral-style(?i:...)fix). Patches are idempotent if you re-run them on a fresh download.
Refer to the original model card for benchmarks, architecture, training data, and intended use.
Use with Transformers
pip install -U transformers accelerate torch pillow
from transformers import AutoProcessor, AutoModelForImageTextToText
import torch
model_id = "ravilution/MolmoWeb-4B"
model = AutoModelForImageTextToText.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.float32,
attn_implementation="sdpa",
device_map="auto",
)
processor = AutoProcessor.from_pretrained(
model_id,
trust_remote_code=True,
padding_side="left",
)
Provenance
- Upstream weights:
allenai/MolmoWeb-4B - Changes on top: compatibility patches only (config / generation_config / tokenizer metadata as above); no retraining or architectural edits.
License
Apache 2.0 — see the original model for details. Please review Ai2’s Responsible Use Guidelines for intended use.
- Downloads last month
- 6