Run this model with HF Jobs
Run SnowRainsdy/BiGrounder-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/SnowRainsdy/BiGrounder-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/SnowRainsdy/BiGrounder-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/SnowRainsdy/BiGrounder-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/SnowRainsdy/BiGrounder-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use SnowRainsdy/BiGrounder-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SnowRainsdy/BiGrounder-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="SnowRainsdy/BiGrounder-4B") 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("SnowRainsdy/BiGrounder-4B") model = AutoModelForMultimodalLM.from_pretrained("SnowRainsdy/BiGrounder-4B", 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 SnowRainsdy/BiGrounder-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SnowRainsdy/BiGrounder-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": "SnowRainsdy/BiGrounder-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/SnowRainsdy/BiGrounder-4B
- SGLang
How to use SnowRainsdy/BiGrounder-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 "SnowRainsdy/BiGrounder-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": "SnowRainsdy/BiGrounder-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 "SnowRainsdy/BiGrounder-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": "SnowRainsdy/BiGrounder-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 SnowRainsdy/BiGrounder-4B with Docker Model Runner:
docker model run hf.co/SnowRainsdy/BiGrounder-4B
BiGrounder-4B
BiGrounder-4B is a GUI grounding model built on Qwen3-VL-4B-Instruct. Given a screenshot and a natural-language instruction, it predicts the target location and action. Bidirectional training improves grounding across different ways of describing the same interface element.
Paper ยท Code ยท Instruction data
Model
| Property | Value |
|---|---|
| Backbone | Qwen3-VL-4B-Instruct |
| Architecture | Qwen3VLForConditionalGeneration |
| Weight precision | BF16 |
| Input | Screenshot and user instruction |
| Output | GUI action with target coordinates |
| Training | Bidirectional supervised fine-tuning followed by bidirectional reinforcement learning |
Bidirectional SFT pairs forward grounding with reverse instruction or description generation across action, bounding-box, and point tasks. Bidirectional RL generates instruction variants on-policy and grounds them back to the target, coupling semantic verification with grounding success through a cycle-consistency reward. Inference uses a single forward grounding pass.
Usage
The example uses the project's grounding wrapper, which supplies the action prompt, image preprocessing, and coordinate parser. Run it on a CUDA GPU with BF16 and FlashAttention 2 support.
git clone https://github.com/Spell-shi/BiGrounder.git
cd BiGrounder
pip install torch torchvision accelerate pillow "transformers==4.57.6"
pip install flash-attn --no-build-isolation
From the repository root:
from PIL import Image
from Eval.models.bigrounder import BiGrounderModel
model = BiGrounderModel()
model.load_model("SnowRainsdy/BiGrounder-4B")
image = Image.open("screenshot.png").convert("RGB")
result = model.ground_only_positive(
instruction="Click the search button.",
image=image,
)
print(result["raw_response"])
if result["point"] is not None:
x, y = result["point"]
print("Normalized point:", (x, y))
print("Image pixel coordinates:", (x * image.width, y * image.height))
The model's action format uses integer coordinates on a 0โ1000 scale. The wrapper returns point as normalized 0โ1 coordinates; point is None when no coordinate is parsed. It predicts actions without executing them.
Evaluation and Training
The evaluation scripts cover ScreenSpot-Pro, ScreenSpot-V2, MMBench-GUI, UI-Vision, and OSWorld-G, including the instruction-variation evaluation. Use SnowRainsdy/BiGrounder-4B as the model path.
See the project repository for Bi-SFT and Bi-RL launch scripts and data construction details.
Citation
@article{shi2026bigrounder,
title={BiGrounder: Bidirectional Training Unlocks the Potential of GUI Grounding},
author={Shi, Dengyao and Fu, Tianyu and Hu, Fei and Su, Anyang and Wang, Hanning and Wang, Shuo and Wu, Minghui and Zhao, Chenxu and Lei, Zhen},
journal={arXiv preprint arXiv:2611.07765},
year={2026}
}
- Downloads last month
- 64
Model tree for SnowRainsdy/BiGrounder-4B
Base model
Qwen/Qwen3-VL-4B-Instruct