| # MODEL_NAME="Qwen/Qwen2-VL-7B-Instruct" | |
| # MODEL_NAME="Qwen/Qwen2-VL-2B-Instruct" | |
| MODEL_NAME="Qwen/Qwen2.5-VL-3B-Instruct" | |
| export PYTHONPATH=src:$PYTHONPATH | |
| deepspeed src/train/train_grpo.py \ | |
| --deepspeed scripts/zero3.json \ | |
| --use_liger_loss True \ | |
| --model_id $MODEL_NAME \ | |
| --data_path /path/to/your/training/data.json \ | |
| --image_folder /path/to/your/image/folder \ | |
| --freeze_vision_tower False \ | |
| --freeze_llm True \ | |
| --freeze_merger False \ | |
| --bf16 True \ | |
| --fp16 False \ | |
| --disable_flash_attn2 False \ | |
| --output_dir output/test_grpo \ | |
| --num_train_epochs 1 \ | |
| --num_generations 2 \ | |
| --per_device_train_batch_size 1 \ | |
| --gradient_accumulation_steps 1 \ | |
| --max_completion_length 256 \ | |
| --max_prompt_length 512 \ | |
| --image_min_pixels $((128 * 28 * 28)) \ | |
| --image_max_pixels $((256 * 28 * 28)) \ | |
| --learning_rate 5e-6 \ | |
| --remove_unused_columns False \ | |
| --weight_decay 0.1 \ | |
| --warmup_ratio 0.03 \ | |
| --lr_scheduler_type "cosine" \ | |
| --logging_steps 1 \ | |
| --tf32 True \ | |
| --gradient_checkpointing True \ | |
| --report_to tensorboard \ | |
| --lazy_preprocess True \ | |
| --save_strategy "epoch" \ | |
| --save_total_limit 10 \ | |
| --dataloader_num_workers 4 |