gsarch commited on
Commit
068770d
·
verified ·
1 Parent(s): fca0293

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +144 -2
README.md CHANGED
@@ -1,3 +1,145 @@
1
- # ViGoRL-3b-Web-Grounding
 
 
 
 
 
2
 
3
- Checkpoint for **ViGoRL** trained on *web_grounding* domain. Uploaded automatically from `/data/group_data/katefgroup/datasets/vigorl_datasets/checkpoints/web_grounding/ViGoRL-3b-Web-Grounding`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ pipeline_tag: image-text-to-text
4
+ base_model:
5
+ - Qwen/Qwen2.5-VL-7B-Instruct
6
+ ---
7
 
8
+ # ViGoRL: Visually Grounded Reinforcement Learning for Visual Reasoning
9
+
10
+ This model card describes the ViGoRL (**Vi**sually **G**r**o**unded **R**einforcement **L**earning) model, introduced in our paper ["Grounded Reinforcement Learning for Visual Reasoning"](https://arxiv.org/abs/2505.23678).
11
+
12
+ **Authors:** Gabriel Sarch, Snigdha Saha, Naitik Khandelwal, Ayush Jain, Michael J. Tarr, Aviral Kumar, Katerina Fragkiadaki
13
+
14
+ ---
15
+
16
+ ## Model Overview
17
+
18
+ ViGoRL is a vision-language model fine-tuned using reinforcement learning (RL) to explicitly anchor textual reasoning steps to visual coordinates. Inspired by human visual cognition, ViGoRL employs multi-turn visual grounding, dynamically zooming into image regions to perform fine-grained visual reasoning and grounding.
19
+
20
+ This model was trained using supervised fine-tuning (SFT) on visually-grounded reasoning traces generated via Monte Carlo Tree Search (MCTS), followed by reinforcement learning with Group Relative Policy Optimization (GRPO).
21
+
22
+ ---
23
+
24
+ ## Model Details
25
+
26
+ * **Base Architecture:** Qwen2.5-Vision-Language (3B or 7B parameters)
27
+ * **Training Paradigm:**
28
+
29
+ * Supervised Fine-Tuning on MCTS-generated reasoning traces
30
+ * Group Relative Policy Optimization (GRPO)
31
+ * Multi-turn visual grounding with dynamic zoom-in feedback (if "Multiturn" appears in name)
32
+
33
+ ---
34
+
35
+ ## Use Cases
36
+
37
+ This model excels in visual reasoning tasks that require precise visual grounding and region-level reasoning. Please see model name for specific domain.
38
+
39
+ * **Spatial Reasoning:** SAT-2, BLINK, RoboSpatial
40
+ * **Visual Search:** V\*Bench
41
+ * **Web Interaction and Grounding:** ScreenSpot (Pro and V2), VisualWebArena
42
+
43
+ ---
44
+
45
+ ## Usage
46
+
47
+ You can load this model easily using Hugging Face's Transformers library:
48
+
49
+ ```python
50
+ from transformers import Qwen2_5_VLForConditionalGeneration, AutoTokenizer, AutoProcessor
51
+ from qwen_vl_utils import process_vision_info
52
+ import torch
53
+
54
+ # # default: Load the model on the available device(s)
55
+ # model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
56
+ # "gsarch/ViGoRL-7b-Web-Grounding", torch_dtype="auto", device_map="auto"
57
+ # ) # replace with any of the ViGoRL models
58
+
59
+ # We recommend enabling flash_attention_2 for better acceleration and memory saving.
60
+ model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
61
+ "gsarch/ViGoRL-7b-Web-Grounding",
62
+ torch_dtype=torch.bfloat16,
63
+ attn_implementation="flash_attention_2",
64
+ device_map="auto",
65
+ )
66
+
67
+ # default processer
68
+ processor = AutoProcessor.from_pretrained("gsarch/ViGoRL-7b-Web-Grounding")
69
+
70
+ # The default range for the number of visual tokens per image in the model is 4-16384.
71
+ # You can set min_pixels and max_pixels according to your needs, such as a token range of 256-1280, to balance performance and cost.
72
+ # min_pixels = 256*28*28
73
+ # max_pixels = 1280*28*28
74
+ # processor = AutoProcessor.from_pretrained("gsarch/ViGoRL-7b-Web-Grounding", min_pixels=min_pixels, max_pixels=max_pixels)
75
+
76
+ messages = [
77
+ {
78
+ "role": "user",
79
+ "content": [
80
+ {
81
+ "type": "image",
82
+ "image": "path/to/image.png",
83
+ },
84
+ {"type": "text", "text": "QUERY HERE"},
85
+ ],
86
+ }
87
+ ]
88
+
89
+ # Preparation for inference
90
+ text = processor.apply_chat_template(
91
+ messages, tokenize=False, add_generation_prompt=True
92
+ )
93
+ image_inputs, video_inputs = process_vision_info(messages)
94
+ inputs = processor(
95
+ text=[text],
96
+ images=image_inputs,
97
+ videos=video_inputs,
98
+ padding=True,
99
+ return_tensors="pt",
100
+ )
101
+ inputs = inputs.to("cuda")
102
+
103
+ # Inference: Generation of the output
104
+ generated_ids = model.generate(**inputs, max_new_tokens=512)
105
+ generated_ids_trimmed = [
106
+ out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
107
+ ]
108
+ output_text = processor.batch_decode(
109
+ generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
110
+ )
111
+ print(output_text) # this will output a single tool call turn of the model if version is multiturn.
112
+ ```
113
+
114
+ **Important**: This model requires a system prompt for proper usage. Please see the model's chat template for details.
115
+
116
+ ---
117
+
118
+ ## Datasets and Training Data
119
+
120
+ Training datasets and generated reasoning chains are publicly available:
121
+
122
+ * [Code](https://github.com/Gabesarch/grounded-rl)
123
+ * [ViGoRL Datasets on Hugging Face](https://huggingface.co/datasets/gsarch/vigorl_datasets)
124
+
125
+ ---
126
+
127
+ ## Citation
128
+
129
+ If you use ViGoRL in your research or applications, please cite our paper:
130
+
131
+ ```bibtex
132
+ @article{sarch2025vigorl,
133
+ title={Grounded Reinforcement Learning for Visual Reasoning},
134
+ author={Sarch, Gabriel and Saha, Snigdha and Khandelwal, Naitik and Jain, Ayush and Tarr, Michael J and Kumar, Aviral and Fragkiadaki, Katerina},
135
+ year={2025}
136
+ }
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Contact
142
+
143
+ For questions, feedback, or collaborations, please reach out to Gabriel Sarch or open an issue in our [GitHub repository](https://github.com/Gabesarch/grounded-rl).
144
+
145
+ ---