About the reproduction of experimental results.
Thank you for your great work!
i tried your training data from https://huggingface.co/datasets/LZXzju/UI-R1-3B-Train, with the training script:
export DEBUG_MODE="true"
export DATA_PATH=../../data/ScreenSpot
export CKPT_PATH=.../Qwen2.5-VL-3B-Instruct
export SAVE_PATH=../../ckpt/ScreenSpot_grpo_Qwen2.5/
export LOG_PATH=${SAVE_PATH}"/debug_log.txt"
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 torchrun --nproc_per_node=8 \
--nnodes="1" \
--node_rank="0" \
--master_addr="127.0.0.1" \
--master_port="12346" \
../ui_r1/src/open_r1/grpo_json_action_coord.py \
--output_dir ${SAVE_PATH} \
--model_name_or_path ${CKPT_PATH} \
--data_file_paths ./train.json \
--image_folders ./train_imgs \
--dataset_name ${DATA_PATH} \
--deepspeed ../ui_r1/local_scripts/zero3.json \
--max_prompt_length 1024 \
--per_device_train_batch_size 1 \
--gradient_accumulation_steps 2 \
--logging_steps 1 \
--bf16 \
--report_to wandb \
--gradient_checkpointing true \
--attn_implementation flash_attention_2 \
--max_pixels 12845056 \
--num_train_epochs 1 \
--run_name GRPO_example \
--save_strategy epoch \
--save_only_model true \
--num_generations 8
but got only 79.48% on Screenspot-mobile, 69.16% on screenspot-desktop, 75.46% on screenspot-web
I'm wondering whether the issue lies in the selection of my training data, or if there might be other settings or configurations that I may have overlooked.
Maybe you can set num_train_epochs to a higher value like 6 or 8
Thank you for your reply! I set the num_train_epochs to 8, but I got even worse results: For example, the results on desktop drops to 67.96%. And I found the loss curve to be unstable and the loss barely decreases:
The acc_reward_coord seems weird. U could debug the accuracy_reward_coord function in grpo_json_action_coord.py. Such as print the scales to see if the pred_coord is normal. Btw when did u download the code? Maybe there's some bugs in grpo_json_action_coord.py that i haven's updated yet.
I noticed that you updated the function about an hour ago, while I pulled the code 8 hours ago, so I didn’t get the latest changes. I’ll update it now, thanks for the heads-up!
Sorry for my mistakes. If there's any questions, feel free to contact with me~
Thank you! I switched to the latest version of the code for training, and found that on the ScreenSpot dataset, the results for the web (77.75%) and mobile (89.04%) settings are 1–2 percentage points lower than what's claimed in the paper. The training loss curve and reward curve also still show noticeable fluctuations. Is this normal?
The curve seems normal and the accuracy deviation is acceptable. You could try more methods to improve it such as more training epoches or more training data or more reasonable rewards.