Instructions to use mlfoundations/Gelato-30B-A3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlfoundations/Gelato-30B-A3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mlfoundations/Gelato-30B-A3B") 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 AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("mlfoundations/Gelato-30B-A3B") model = AutoModelForImageTextToText.from_pretrained("mlfoundations/Gelato-30B-A3B") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use mlfoundations/Gelato-30B-A3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlfoundations/Gelato-30B-A3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlfoundations/Gelato-30B-A3B", "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/mlfoundations/Gelato-30B-A3B
- SGLang
How to use mlfoundations/Gelato-30B-A3B 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 "mlfoundations/Gelato-30B-A3B" \ --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": "mlfoundations/Gelato-30B-A3B", "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 "mlfoundations/Gelato-30B-A3B" \ --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": "mlfoundations/Gelato-30B-A3B", "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 mlfoundations/Gelato-30B-A3B with Docker Model Runner:
docker model run hf.co/mlfoundations/Gelato-30B-A3B
🍨 Gelato — From Data Curation to Reinforcement Learning: Building a Strong Grounding Model for Computer-Use Agents
🍨 Blog Post / Codebase | 🖱️ Click-100k (dataset)
We are releasing 🍨 Gelato-30B-A3B, a state-of-the-art grounding model for GUI computer-use tasks! Gelato is trained on our open-sourced Click-100k dataset and achieves 63.88% accuracy on ScreenSpot-Pro and 69.15% / 74.65% on OS-World-G / OS-World-G (Refined), surpassing prior specialized computer grounding models like GTA1-32B and much larger VLMs including Qwen3-VL-235B-A22B-Instruct.
Performance
Gelato-30B-A3B outperforms the SoTA specialized computer grounding model, GTA1-32B, and larger VLMs on the ScreenSpot-Pro and OS-World-G grounding benchmarks.
| Model | Activated Size | ScreenSpot-Pro | OS-World-G | OS-World-G (Refined) |
|---|---|---|---|---|
| Qwen3-VL-30B-A3B-Instruct | 3 B | 60.5% | 61.0% | - |
| Qwen3-VL-235B-A22B-Instruct | 22 B | 62.0% | 66.7% | - |
| OpenCUA-72B | 72 B | 60.8% | 59.6% | - |
| GTA1-32B | 32 B | 63.6% | 65.2% | 72.2% |
| Gelato-30B-A3B | 3 B | 63.88% | 69.15% | 74.65% |
Inference
Below is a code snippet demonstrating how to inference the Gelato-30B-A3B model. Given an image and an instruction, we output normalized click coordinates in the range [0,1000].

from transformers import Qwen3VLMoeForConditionalGeneration, AutoProcessor
import re
from PIL import Image, ImageDraw
import requests
from io import BytesIO
def extract_coordinates(raw_string):
"""
Extract the coordinates from the raw string.
Args:
raw_string: str (e.g. "(100, 200)")
Returns:
x: float (e.g. 100.0)
y: float (e.g. 200.0)
"""
try:
matches = re.findall(r"\((-?\d*\.?\d+),\s*(-?\d*\.?\d+)\)", raw_string)
return [tuple(map(int, match)) for match in matches][0]
except:
return 0,0
def visualize_prediction(img, pred_x, pred_y, img_width, img_height):
"""
Visualize the predicted coordinates on the image (high visibility).
"""
pred_x = int((pred_x * img_width) / 1000)
pred_y = int((pred_y * img_height) / 1000)
draw = ImageDraw.Draw(img, "RGBA")
r = 30
draw.ellipse(
(pred_x - r, pred_y - r, pred_x + r, pred_y + r),
outline="lime",
fill=(0, 255, 0, 90),
width=5
)
cross_len = 15
draw.line((pred_x - cross_len, pred_y, pred_x + cross_len, pred_y), fill="lime", width=5)
draw.line((pred_x, pred_y - cross_len, pred_x, pred_y + cross_len), fill="lime", width=5)
img.save("predicted_coordinates.png")
print(f"Predicted coordinates: ({pred_x}, {pred_y})")
# Load the model and processor
MODEL_PATH = "mlfoundations/Gelato-30B-A3B"
model = Qwen3VLMoeForConditionalGeneration.from_pretrained(
MODEL_PATH,
device_map="auto",
dtype="auto"
)
processor = AutoProcessor.from_pretrained(
MODEL_PATH
)
url = "https://github.com/QwenLM/Qwen3-VL/raw/main/cookbooks/assets/computer_use/computer_use1.jpeg"
response = requests.get(url)
img = Image.open(BytesIO(response.content))
img_width, img_height = img.size
# Prepare messages
PROMPT = '''
You are an expert UI element locator. Given a GUI image and a user's element description, provide the coordinates of the specified element as a single (x,y) point. For elements with area, return the center point.
Output the coordinate pair exactly:
(x,y)
'''
PROMPT = PROMPT.strip()
INSTRUCTION = "Reload the cache."
messages = [
{
"role": "user",
"content": [
{"type": "text", "text": PROMPT + "\n\n"},
{"type": "image", "image": img},
{"type": "text", "text": "\n" + INSTRUCTION},
],
}
]
device = next(model.parameters()).device
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
).to(device)
# Inference: Generation of the output
generated_ids = model.generate(**inputs, max_new_tokens=32)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
# Extract the coordinates from the output text
print(f"Model output: {output_text[0]}")
pred_x, pred_y = extract_coordinates(output_text[0])
# Calculate the absolute coordinates from normalized coordinates
visualize_prediction(img, pred_x, pred_y, img_width, img_height)
Citation
If you use 🍨 Gelato in your research, please cite it as follows:
@misc{gelato2025,
title={Gelato — From Data Curation to Reinforcement Learning: Building a Strong Grounding Model for Computer-Use Agents},
author={Anas Awadalla, Dhruba Ghosh, Aylin Akkus, Yuhui Zhang, Marianna Nezhurina, Jenia Jitsev, Yejin Choi, Ludwig Schmidt},
year={2025},
publisher={GitHub},
howpublished={\url{https://github.com/mlfoundations/gelato}},
}
- Downloads last month
- 168