-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_lora_exp.sh
161 lines (152 loc) · 5.11 KB
/
run_lora_exp.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
data_dir=./sample_data
nmd=/vol/bitbucket/l22/llama2_models_lora_16
pof=./predictions_llama2_lora_16.txt
log=./log_files/log_llama2_lora_exp.txt
ckpt_path=/vol/bitbucket/l22/llama2_models_lora_16/ckpt_0
accelerate launch ./src/relation_extraction.py \
--model_type llama2 \
--data_format_mode 0 \
--classification_scheme 2 \
--pretrained_model meta-llama/Llama-2-7b-hf \
--data_dir $data_dir \
--num_core 3 \
--new_model_dir $nmd \
--predict_output_file $pof \
--overwrite_model_dir \
--seed 13 \
--max_seq_length 256 \
--cache_data \
--do_train \
--do_lower_case \
--lora_rank 16 \
--lora_alpha 32 \
--train_batch_size 2 \
--eval_batch_size 2 \
--learning_rate 1e-4 \
--num_train_epochs 3 \
--gradient_accumulation_steps 4 \
--do_warmup \
--warmup_ratio 0.1 \
--weight_decay 0 \
--max_num_checkpoints 2 \
--log_file $log \
--log_step 500 \
--progress_bar
accelerate launch ./src/relation_extraction.py \
--model_type llama2 \
--ckpt_dir $ckpt_path\
--data_format_mode 0 \
--classification_scheme 2 \
--pretrained_model meta-llama/Llama-2-7b-hf \
--data_dir $data_dir \
--new_model_dir $nmd \
--predict_output_file $pof \
--seed 13 \
--max_seq_length 256 \
--cache_data \
--do_predict \
--do_lower_case \
--eval_batch_size 2 \
--log_file $log \
--progress_bar
data_dir=./sample_data
nmd=/vol/bitbucket/l22/llama2_models_lora_8
pof=./predictions_llama2_lora_8.txt
ckpt_path=/vol/bitbucket/l22/llama2_models_lora_8/ckpt_0
accelerate launch ./src/relation_extraction.py \
--model_type llama2 \
--data_format_mode 0 \
--classification_scheme 2 \
--pretrained_model meta-llama/Llama-2-7b-hf \
--data_dir $data_dir \
--num_core 3 \
--new_model_dir $nmd \
--predict_output_file $pof \
--overwrite_model_dir \
--seed 13 \
--max_seq_length 256 \
--cache_data \
--do_train \
--do_lower_case \
--lora_rank 8 \
--lora_alpha 32 \
--train_batch_size 2 \
--eval_batch_size 2 \
--learning_rate 1e-4 \
--num_train_epochs 3 \
--gradient_accumulation_steps 4 \
--do_warmup \
--warmup_ratio 0.1 \
--weight_decay 0 \
--max_num_checkpoints 2 \
--log_file $log \
--log_step 500 \
--progress_bar
accelerate launch ./src/relation_extraction.py \
--model_type llama2 \
--ckpt_dir $ckpt_path\
--data_format_mode 0 \
--classification_scheme 2 \
--pretrained_model meta-llama/Llama-2-7b-hf \
--data_dir $data_dir \
--new_model_dir $nmd \
--predict_output_file $pof \
--seed 13 \
--max_seq_length 256 \
--cache_data \
--do_predict \
--do_lower_case \
--eval_batch_size 2 \
--log_file $log \
--progress_bar
data_dir=./sample_data
nmd=/vol/bitbucket/l22/llama2_models_lora_4
pof=./predictions_llama2_lora_4.txt
ckpt_path=/vol/bitbucket/l22/llama2_models_lora_4/ckpt_0
# NOTE: we have more options available, you can check our wiki for more information
accelerate launch ./src/relation_extraction.py \
--model_type llama2 \
--data_format_mode 0 \
--classification_scheme 2 \
--pretrained_model meta-llama/Llama-2-7b-hf \
--data_dir $data_dir \
--num_core 3 \
--new_model_dir $nmd \
--predict_output_file $pof \
--overwrite_model_dir \
--seed 13 \
--max_seq_length 256 \
--cache_data \
--do_train \
--do_lower_case \
--lora_rank 4 \
--lora_alpha 32 \
--train_batch_size 2 \
--eval_batch_size 2 \
--learning_rate 1e-4 \
--num_train_epochs 3 \
--gradient_accumulation_steps 4 \
--do_warmup \
--warmup_ratio 0.1 \
--weight_decay 0 \
--max_num_checkpoints 2 \
--log_file $log \
--log_step 500 \
--progress_bar
accelerate launch ./src/relation_extraction.py \
--model_type llama2 \
--ckpt_dir $ckpt_path\
--data_format_mode 0 \
--classification_scheme 2 \
--pretrained_model meta-llama/Llama-2-7b-hf \
--data_dir $data_dir \
--new_model_dir $nmd \
--predict_output_file $pof \
--seed 13 \
--max_seq_length 256 \
--cache_data \
--do_predict \
--do_lower_case \
--eval_batch_size 2 \
--log_file $log \
--progress_bar