-
Notifications
You must be signed in to change notification settings - Fork 615
/
Copy pathmulti_node2.sh
executable file
·39 lines (38 loc) · 1.07 KB
/
multi_node2.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
export CUDA_VISIBLE_DEVICES=0,1,2,3
export NNODES=2
export NODE_RANK=1
export MASTER_ADDR=xxx.xxx.xxx.xxx
export MASTER_PORT=29500
export NPROC_PER_NODE=3
swift rlhf \
--rlhf_type grpo \
--model Qwen/Qwen2.5-Math-7B \
--reward_funcs accuracy format \
--use_vllm true \
--vllm_device auto \
--vllm_gpu_memory_utilization 0.5 \
--vllm_max_model_len 4096 \
--num_infer_workers 1 \
--train_type full \
--torch_dtype bfloat16 \
--dataset 'AI-MO/NuminaMath-TIR#5000' \
--max_completion_length 2048 \
--num_train_epochs 1 \
--per_device_train_batch_size 1 \
--per_device_eval_batch_size 1 \
--learning_rate 1e-6 \
--gradient_accumulation_steps 2 \
--eval_steps 200 \
--save_steps 200 \
--save_total_limit 2 \
--logging_steps 5 \
--max_length 4096 \
--output_dir output \
--warmup_ratio 0.05 \
--dataloader_num_workers 4 \
--dataset_num_proc 4 \
--num_generations 7 \
--temperature 0.9 \
--system 'examples/train/grpo/prompt.txt' \
--deepspeed zero2 \
--log_completions true