-
Notifications
You must be signed in to change notification settings - Fork 237
/
Copy pathrun_grpo_rec_lora.sh
43 lines (38 loc) · 1.14 KB
/
run_grpo_rec_lora.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cd src/open-r1-multimodal
export DEBUG_MODE="true"
# export CUDA_VISIBLE_DEVICES=4,5,6,7
RUN_NAME="Qwen2.5-VL-7B-GRPO-REC-lora"
export LOG_PATH="./debug_log_$RUN_NAME.txt"
torchrun --nproc_per_node="8" \
--nnodes="1" \
--node_rank="0" \
--master_addr="127.0.0.1" \
--master_port="12346" \
src/open_r1/grpo_rec.py \
--deepspeed local_scripts/zero2.json \
--output_dir output/$RUN_NAME \
--model_name_or_path Qwen/Qwen2.5-VL-7B-Instruct \
--dataset_name data_config/rec.yaml \
--image_root <your_image_root> \
--max_prompt_length 1024 \
--num_generations 8 \
--per_device_train_batch_size 1 \
--gradient_accumulation_steps 2 \
--logging_steps 1 \
--bf16 \
--torch_dtype bfloat16 \
--data_seed 42 \
--report_to wandb \
--gradient_checkpointing true \
--attn_implementation flash_attention_2 \
--num_train_epochs 2 \
--run_name $RUN_NAME \
--save_steps 100 \
--save_only_model true \
--learning_rate 1e-5 \
--use_peft true \
--lora_r 64 \
--lora_alpha 128 \
--lora_dropout 0.05 \
--lora_task_type CAUSAL_LM \
--freeze_vision_modules true