forked from hiyouga/LLaMA-Factory
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path360-example.sh
67 lines (66 loc) · 1.8 KB
/
360-example.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
export DS_SKIP_CUDA_CHECK=1
export DISABLE_VERSION_CHECK=1 # if necessary
# sft
deepspeed --hostfile=hostfile.2nodes src/train.py \
--stage sft \
--do_train \
--model_name_or_path xxx \
--dataset sft_toy \
--template qwen \
--finetuning_type full \
--output_dir output/sft-test \
--cache_dir .cache \
--overwrite_cache \
--overwrite_output_dir \
--cutoff_len 100000 \
--per_device_train_batch_size 1 \
--gradient_accumulation_steps 1 \
--lr_scheduler_type cosine \
--warmup_ratio 0.0 \
--logging_steps 1 \
--save_strategy steps \
--save_steps 2000 \
--learning_rate 5e-6 \
--num_train_epochs 4 \
--plot_loss \
--save_only_model True \
--deepspeed examples/deepspeed/ds_z3_offload_config.json \
--bf16 True \
--flash_attn fa2 \
--gradient_checkpointing True \
--seed 42 \
--sequence_parallel_size 8 \
--packing True
# dpo
deepspeed --hostfile=hostfile.1mac src/train.py \
--stage dpo \
--do_train \
--model_name_or_path xxx \
--dataset dpo_toy \
--template qwen \
--finetuning_type full \
--pref_beta 0.1 \
--pref_loss sigmoid \
--output_dir output/debug \
--cache_dir .cache \
--overwrite_cache \
--overwrite_output_dir \
--cutoff_len 32768 \
--per_device_train_batch_size 1 \
--gradient_accumulation_steps 4 \
--lr_scheduler_type cosine \
--warmup_ratio 0.0 \
--logging_steps 1 \
--save_steps 2000 \
--save_strategy steps \
--learning_rate 1e-6 \
--num_train_epochs 10 \
--plot_loss \
--save_only_model True \
--deepspeed examples/deepspeed/ds_z3_offload_config.json \
--flash_attn fa2 \
--gradient_checkpointing True \
--bf16 True \
--ddp_timeout 180000000 \
--seed 42 \
--sequence_parallel_size 4