forked from yhao-wang/REAR
-
Notifications
You must be signed in to change notification settings - Fork 1
/
train.sh
51 lines (48 loc) · 1.22 KB
/
train.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
#!/bin/bash
export OMP_NUM_THREADS=20
llama_path=$1
output_dir=$2
data_dir=$3
ds_config=$4
deepspeed \
--master_port=9943 \
rear/train.py \
--deepspeed $4 \
--model_name_or_path $llama_path \
--data ${data_dir}/warm_up_data.json \
--is_warm_up true \
--rank_beta 1 \
--rank_bias 0.7 \
--proj_scaler 2.0 \
--lr_scheduler_type cosine \
--output_dir $output_dir/warm-up \
--overwrite_output_dir \
--warmup_ratio 0.03 \
--per_device_train_batch_size 32 \
--gradient_accumulation_steps 2 \
--logging_steps 10 \
--learning_rate 1e-6 \
--num_train_epochs 2 \
--bf16
deepspeed \
--master_port=9943 \
rear/train.py \
--deepspeed $4 \
--model_name_or_path $output_dir/warm-up \
--data ${data_dir}/training_data.json \
--is_warm_up false \
--rank_beta 1 \
--rank_bias 0.8 \
--bce_bias 0.3 \
--proj_scaler 2.0 \
--minor_diff 0.1 \
--lr_scheduler_type cosine \
--output_dir $output_dir/rear-llama-7b-hf \
--overwrite_output_dir \
--warmup_ratio 0.03 \
--per_device_train_batch_size 4 \
--gradient_accumulation_steps 2 \
--logging_steps 10 \
--learning_rate 1e-6 \
--num_train_epochs 2 \
--bf16