-
Notifications
You must be signed in to change notification settings - Fork 534
/
Copy pathtrain_72b_4gpu.sh
42 lines (42 loc) · 1.17 KB
/
train_72b_4gpu.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
42
# 4*80G GPU
CUDA_VISIBLE_DEVICES=0,1,2,3 \
NPROC_PER_NODE=4 \
swift rlhf \
--rlhf_type grpo \
--model Qwen/Qwen2.5-72B-Instruct \
--train_type lora \
--dataset AI-MO/NuminaMath-TIR#10000 \
--torch_dtype bfloat16 \
--num_train_epochs 1 \
--max_length 2048 \
--per_device_train_batch_size 1 \
--per_device_eval_batch_size 1 \
--gradient_accumulation_steps 1 \
--eval_steps 1000 \
--save_steps 1000 \
--learning_rate 1e-6 \
--save_total_limit 2 \
--logging_steps 5 \
--output_dir output \
--warmup_ratio 0.05 \
--dataloader_num_workers 4 \
--max_completion_length 1024 \
--reward_funcs accuracy format \
--num_generations 4 \
--system examples/train/grpo/prompt.txt \
--use_vllm true \
--vllm_gpu_memory_utilization 0.5 \
--vllm_max_model_len 2048 \
--deepspeed zero3_offload \
--temperature 1.0 \
--top_p 1.0 \
--top_k 80 \
--log_completions true \
--num_infer_workers 4 \
--tensor_parallel_size 4 \
--async_generate false \
--move_model_batches 16 \
--offload_optimizer true \
--offload_model true \
--gc_collect_after_offload true \
--sleep_level 1