-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinetune_selected.sh
34 lines (31 loc) · 1013 Bytes
/
finetune_selected.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
#!/bin/zsh
current_time=$(date +"%m%d_%H-%M")
lang_list=("Chinese" "English" "French" "Japanese" "Russian" "Spanish")
for lang in "${lang_list[@]}"; do
dir_path="./output0.8_selected_weight1.0/${lang}"
mkdir -p "$dir_path"
python finetune.py \
--model_name_or_path ''\
--train_files '' \
--output_dir $dir_path \
--do_train True \
--max_seq_length 2048 \
--logging_steps 1 \
--save_strategy "steps" \
--save_steps 65 \
--max_steps 260 \
--learning_rate 2e-5 \
--lora True \
--lora_r 16 \
--lora_alpha 16 \
--lora_dropout 0.05 \
--lora_target_modules q_proj v_proj \
--report_to wandb \
--optim adamw_torch \
--overwrite_output_dir True \
--per_device_train_batch_size 2 \
--gradient_accumulation_steps 8 \
--warmup_ratio 0.03 \
--overwrite_output_dir True \
> ${dir_path}/output_${lang}_1052_${current_time}.txt
done