-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_dpo.sh
28 lines (28 loc) · 860 Bytes
/
run_dpo.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
torchrun --nproc_per_node 8 cripts/dpo_training.py \
--model_type baichuan \
--model_name_or_path ./checkpoints/Qilin-Med-SFT-merged \
--train_file_dir ./data/dpo \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 4 \
--deepspeed config/deepspeed_config_zero2.json \
--do_train \
--do_eval \
--use_peft True \
--max_train_samples 10000000 \
--max_eval_samples 200 \
--max_steps 100000 \
--eval_steps 200 \
--save_steps 1000 \
--max_source_length 1024 \
--max_target_length 128 \
--output_dir ./checkpoints/Qilin-Med-DPO \
--target_modules all \
--lora_rank 8 \
--lora_alpha 16 \
--lora_dropout 0.05 \
--torch_dtype float16 \
--bf16 \
--device_map auto \
--remove_unused_columns False \
--gradient_checkpointing True \
--cache_dir ./cache