forked from modelscope/ms-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrloo.sh
More file actions
45 lines (45 loc) · 1.33 KB
/
rloo.sh
File metadata and controls
45 lines (45 loc) · 1.33 KB
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
42
43
44
45
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
NPROC_PER_NODE=8 \
swift rlhf \
--rlhf_type grpo \
--advantage_estimator rloo \
--kl_in_reward true \
--model Qwen/Qwen2.5-VL-3B-Instruct \
--external_plugins examples/train/grpo/plugin/plugin.py \
--reward_funcs external_r1v_acc format \
--use_vllm true \
--vllm_mode colocate \
--vllm_gpu_memory_utilization 0.4 \
--vllm_tensor_parallel_size 1 \
--vllm_max_model_len 16384 \
--train_type lora \
--torch_dtype bfloat16 \
--dataset 'AI-ModelScope/clevr_cogen_a_train' \
--overlong_filter false \
--epsilon 3e-4 \
--epsilon_high 4e-4 \
--max_completion_length 1024 \
--num_train_epochs 1 \
--per_device_train_batch_size 2 \
--learning_rate 1e-6 \
--gradient_accumulation_steps 4 \
--eval_steps 1000 \
--save_steps 1000 \
--save_total_limit 10 \
--sleep_level 1 \
--offload_model true \
--offload_optimizer true \
--logging_steps 1 \
--dataloader_num_workers 4 \
--num_generations 16 \
--temperature 1.0 \
--system 'examples/train/grpo/prompt.txt' \
--deepspeed zero2 \
--log_completions true \
--report_to tensorboard swanlab \
--num_iterations 1 \
--async_generate false \
--beta 0.001 \
--attn_impl flash_attention_2 \
--padding_free true \
--loss_type grpo