Add other files from fine-tunning
Browse filesDelete eval_nbest_predictions.json due to size limit
- README.md +20 -0
- all_results.json +22 -0
- eval_null_odds.json +0 -0
- eval_predictions.json +0 -0
- eval_results.json +17 -0
- train_results.json +8 -0
- trainer_state.json +289 -0
- training_args.bin +3 -0
- tune_qa.sh +16 -0
README.md
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
**[`microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext`](https://huggingface.co/microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext)** fine-tuned on **[`SQuAD V2`](https://rajpurkar.github.io/SQuAD-explorer/)** using **[`run_qa.py`](https://github.com/huggingface/transformers/blob/master/examples/pytorch/question-answering/run_qa.py)**
|
2 |
+
|
3 |
+
Tunning script:
|
4 |
+
```bash
|
5 |
+
BASE_MODEL=microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext
|
6 |
+
OUTPUT_DIR=~/Documents/projects/tunned_models/ms_pubmed_bert_squadv2/
|
7 |
+
|
8 |
+
python run_qa.py \
|
9 |
+
--model_name_or_path $BASE_MODEL\
|
10 |
+
--dataset_name squad_v2 \
|
11 |
+
--do_train \
|
12 |
+
--do_eval \
|
13 |
+
--version_2_with_negative \
|
14 |
+
--per_device_train_batch_size 12 \
|
15 |
+
--learning_rate 3e-5 \
|
16 |
+
--num_train_epochs 2 \
|
17 |
+
--max_seq_length 384 \
|
18 |
+
--doc_stride 128 \
|
19 |
+
--output_dir $OUTPUT_DIR
|
20 |
+
```
|
all_results.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.0,
|
3 |
+
"eval_HasAns_exact": 73.26248313090419,
|
4 |
+
"eval_HasAns_f1": 79.53074066003731,
|
5 |
+
"eval_HasAns_total": 5928,
|
6 |
+
"eval_NoAns_exact": 81.53069806560134,
|
7 |
+
"eval_NoAns_f1": 81.53069806560134,
|
8 |
+
"eval_NoAns_total": 5945,
|
9 |
+
"eval_best_exact": 77.4025098964036,
|
10 |
+
"eval_best_exact_thresh": 0.0,
|
11 |
+
"eval_best_f1": 80.53215115242146,
|
12 |
+
"eval_best_f1_thresh": 0.0,
|
13 |
+
"eval_exact": 77.4025098964036,
|
14 |
+
"eval_f1": 80.53215115242146,
|
15 |
+
"eval_samples": 12271,
|
16 |
+
"eval_total": 11873,
|
17 |
+
"train_loss": 0.9526093118189042,
|
18 |
+
"train_runtime": 484536.8861,
|
19 |
+
"train_samples": 132768,
|
20 |
+
"train_samples_per_second": 0.548,
|
21 |
+
"train_steps_per_second": 0.046
|
22 |
+
}
|
eval_null_odds.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
eval_predictions.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
eval_results.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.0,
|
3 |
+
"eval_HasAns_exact": 73.26248313090419,
|
4 |
+
"eval_HasAns_f1": 79.53074066003731,
|
5 |
+
"eval_HasAns_total": 5928,
|
6 |
+
"eval_NoAns_exact": 81.53069806560134,
|
7 |
+
"eval_NoAns_f1": 81.53069806560134,
|
8 |
+
"eval_NoAns_total": 5945,
|
9 |
+
"eval_best_exact": 77.4025098964036,
|
10 |
+
"eval_best_exact_thresh": 0.0,
|
11 |
+
"eval_best_f1": 80.53215115242146,
|
12 |
+
"eval_best_f1_thresh": 0.0,
|
13 |
+
"eval_exact": 77.4025098964036,
|
14 |
+
"eval_f1": 80.53215115242146,
|
15 |
+
"eval_samples": 12271,
|
16 |
+
"eval_total": 11873
|
17 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 2.0,
|
3 |
+
"train_loss": 0.9526093118189042,
|
4 |
+
"train_runtime": 484536.8861,
|
5 |
+
"train_samples": 132768,
|
6 |
+
"train_samples_per_second": 0.548,
|
7 |
+
"train_steps_per_second": 0.046
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,289 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 2.0,
|
5 |
+
"global_step": 22128,
|
6 |
+
"is_hyper_param_search": false,
|
7 |
+
"is_local_process_zero": true,
|
8 |
+
"is_world_process_zero": true,
|
9 |
+
"log_history": [
|
10 |
+
{
|
11 |
+
"epoch": 0.05,
|
12 |
+
"learning_rate": 2.9322125813449026e-05,
|
13 |
+
"loss": 2.223,
|
14 |
+
"step": 500
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.09,
|
18 |
+
"learning_rate": 2.8644251626898048e-05,
|
19 |
+
"loss": 1.5712,
|
20 |
+
"step": 1000
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"epoch": 0.14,
|
24 |
+
"learning_rate": 2.7966377440347073e-05,
|
25 |
+
"loss": 1.4365,
|
26 |
+
"step": 1500
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"epoch": 0.18,
|
30 |
+
"learning_rate": 2.7288503253796095e-05,
|
31 |
+
"loss": 1.3255,
|
32 |
+
"step": 2000
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"epoch": 0.23,
|
36 |
+
"learning_rate": 2.661062906724512e-05,
|
37 |
+
"loss": 1.2879,
|
38 |
+
"step": 2500
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 0.27,
|
42 |
+
"learning_rate": 2.5932754880694143e-05,
|
43 |
+
"loss": 1.2262,
|
44 |
+
"step": 3000
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.32,
|
48 |
+
"learning_rate": 2.5254880694143168e-05,
|
49 |
+
"loss": 1.2299,
|
50 |
+
"step": 3500
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"epoch": 0.36,
|
54 |
+
"learning_rate": 2.457700650759219e-05,
|
55 |
+
"loss": 1.1777,
|
56 |
+
"step": 4000
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"epoch": 0.41,
|
60 |
+
"learning_rate": 2.3899132321041215e-05,
|
61 |
+
"loss": 1.1717,
|
62 |
+
"step": 4500
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"epoch": 0.45,
|
66 |
+
"learning_rate": 2.322125813449024e-05,
|
67 |
+
"loss": 1.1411,
|
68 |
+
"step": 5000
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 0.5,
|
72 |
+
"learning_rate": 2.2543383947939266e-05,
|
73 |
+
"loss": 1.1099,
|
74 |
+
"step": 5500
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"epoch": 0.54,
|
78 |
+
"learning_rate": 2.1865509761388288e-05,
|
79 |
+
"loss": 1.1054,
|
80 |
+
"step": 6000
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"epoch": 0.59,
|
84 |
+
"learning_rate": 2.1187635574837313e-05,
|
85 |
+
"loss": 1.0961,
|
86 |
+
"step": 6500
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 0.63,
|
90 |
+
"learning_rate": 2.0509761388286335e-05,
|
91 |
+
"loss": 1.0753,
|
92 |
+
"step": 7000
|
93 |
+
},
|
94 |
+
{
|
95 |
+
"epoch": 0.68,
|
96 |
+
"learning_rate": 1.983188720173536e-05,
|
97 |
+
"loss": 1.0311,
|
98 |
+
"step": 7500
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"epoch": 0.72,
|
102 |
+
"learning_rate": 1.9154013015184382e-05,
|
103 |
+
"loss": 1.0377,
|
104 |
+
"step": 8000
|
105 |
+
},
|
106 |
+
{
|
107 |
+
"epoch": 0.77,
|
108 |
+
"learning_rate": 1.8476138828633408e-05,
|
109 |
+
"loss": 1.0191,
|
110 |
+
"step": 8500
|
111 |
+
},
|
112 |
+
{
|
113 |
+
"epoch": 0.81,
|
114 |
+
"learning_rate": 1.779826464208243e-05,
|
115 |
+
"loss": 0.9882,
|
116 |
+
"step": 9000
|
117 |
+
},
|
118 |
+
{
|
119 |
+
"epoch": 0.86,
|
120 |
+
"learning_rate": 1.7120390455531455e-05,
|
121 |
+
"loss": 0.9928,
|
122 |
+
"step": 9500
|
123 |
+
},
|
124 |
+
{
|
125 |
+
"epoch": 0.9,
|
126 |
+
"learning_rate": 1.6442516268980477e-05,
|
127 |
+
"loss": 0.9701,
|
128 |
+
"step": 10000
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 0.95,
|
132 |
+
"learning_rate": 1.5764642082429502e-05,
|
133 |
+
"loss": 0.9901,
|
134 |
+
"step": 10500
|
135 |
+
},
|
136 |
+
{
|
137 |
+
"epoch": 0.99,
|
138 |
+
"learning_rate": 1.5086767895878524e-05,
|
139 |
+
"loss": 0.9647,
|
140 |
+
"step": 11000
|
141 |
+
},
|
142 |
+
{
|
143 |
+
"epoch": 1.04,
|
144 |
+
"learning_rate": 1.4408893709327548e-05,
|
145 |
+
"loss": 0.784,
|
146 |
+
"step": 11500
|
147 |
+
},
|
148 |
+
{
|
149 |
+
"epoch": 1.08,
|
150 |
+
"learning_rate": 1.3731019522776571e-05,
|
151 |
+
"loss": 0.7568,
|
152 |
+
"step": 12000
|
153 |
+
},
|
154 |
+
{
|
155 |
+
"epoch": 1.13,
|
156 |
+
"learning_rate": 1.3053145336225597e-05,
|
157 |
+
"loss": 0.7582,
|
158 |
+
"step": 12500
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 1.17,
|
162 |
+
"learning_rate": 1.237527114967462e-05,
|
163 |
+
"loss": 0.7732,
|
164 |
+
"step": 13000
|
165 |
+
},
|
166 |
+
{
|
167 |
+
"epoch": 1.22,
|
168 |
+
"learning_rate": 1.1697396963123646e-05,
|
169 |
+
"loss": 0.7331,
|
170 |
+
"step": 13500
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 1.27,
|
174 |
+
"learning_rate": 1.101952277657267e-05,
|
175 |
+
"loss": 0.7623,
|
176 |
+
"step": 14000
|
177 |
+
},
|
178 |
+
{
|
179 |
+
"epoch": 1.31,
|
180 |
+
"learning_rate": 1.0341648590021693e-05,
|
181 |
+
"loss": 0.7403,
|
182 |
+
"step": 14500
|
183 |
+
},
|
184 |
+
{
|
185 |
+
"epoch": 1.36,
|
186 |
+
"learning_rate": 9.663774403470717e-06,
|
187 |
+
"loss": 0.7096,
|
188 |
+
"step": 15000
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"epoch": 1.4,
|
192 |
+
"learning_rate": 8.98590021691974e-06,
|
193 |
+
"loss": 0.7049,
|
194 |
+
"step": 15500
|
195 |
+
},
|
196 |
+
{
|
197 |
+
"epoch": 1.45,
|
198 |
+
"learning_rate": 8.308026030368764e-06,
|
199 |
+
"loss": 0.7097,
|
200 |
+
"step": 16000
|
201 |
+
},
|
202 |
+
{
|
203 |
+
"epoch": 1.49,
|
204 |
+
"learning_rate": 7.630151843817788e-06,
|
205 |
+
"loss": 0.7169,
|
206 |
+
"step": 16500
|
207 |
+
},
|
208 |
+
{
|
209 |
+
"epoch": 1.54,
|
210 |
+
"learning_rate": 6.952277657266811e-06,
|
211 |
+
"loss": 0.7172,
|
212 |
+
"step": 17000
|
213 |
+
},
|
214 |
+
{
|
215 |
+
"epoch": 1.58,
|
216 |
+
"learning_rate": 6.274403470715835e-06,
|
217 |
+
"loss": 0.7446,
|
218 |
+
"step": 17500
|
219 |
+
},
|
220 |
+
{
|
221 |
+
"epoch": 1.63,
|
222 |
+
"learning_rate": 5.5965292841648585e-06,
|
223 |
+
"loss": 0.6982,
|
224 |
+
"step": 18000
|
225 |
+
},
|
226 |
+
{
|
227 |
+
"epoch": 1.67,
|
228 |
+
"learning_rate": 4.918655097613883e-06,
|
229 |
+
"loss": 0.6878,
|
230 |
+
"step": 18500
|
231 |
+
},
|
232 |
+
{
|
233 |
+
"epoch": 1.72,
|
234 |
+
"learning_rate": 4.240780911062907e-06,
|
235 |
+
"loss": 0.6856,
|
236 |
+
"step": 19000
|
237 |
+
},
|
238 |
+
{
|
239 |
+
"epoch": 1.76,
|
240 |
+
"learning_rate": 3.5629067245119307e-06,
|
241 |
+
"loss": 0.6951,
|
242 |
+
"step": 19500
|
243 |
+
},
|
244 |
+
{
|
245 |
+
"epoch": 1.81,
|
246 |
+
"learning_rate": 2.8850325379609543e-06,
|
247 |
+
"loss": 0.6837,
|
248 |
+
"step": 20000
|
249 |
+
},
|
250 |
+
{
|
251 |
+
"epoch": 1.85,
|
252 |
+
"learning_rate": 2.2071583514099784e-06,
|
253 |
+
"loss": 0.6826,
|
254 |
+
"step": 20500
|
255 |
+
},
|
256 |
+
{
|
257 |
+
"epoch": 1.9,
|
258 |
+
"learning_rate": 1.529284164859002e-06,
|
259 |
+
"loss": 0.6854,
|
260 |
+
"step": 21000
|
261 |
+
},
|
262 |
+
{
|
263 |
+
"epoch": 1.94,
|
264 |
+
"learning_rate": 8.514099783080261e-07,
|
265 |
+
"loss": 0.6944,
|
266 |
+
"step": 21500
|
267 |
+
},
|
268 |
+
{
|
269 |
+
"epoch": 1.99,
|
270 |
+
"learning_rate": 1.735357917570499e-07,
|
271 |
+
"loss": 0.6932,
|
272 |
+
"step": 22000
|
273 |
+
},
|
274 |
+
{
|
275 |
+
"epoch": 2.0,
|
276 |
+
"step": 22128,
|
277 |
+
"total_flos": 6.662030063085158e+16,
|
278 |
+
"train_loss": 0.9526093118189042,
|
279 |
+
"train_runtime": 484536.8861,
|
280 |
+
"train_samples_per_second": 0.548,
|
281 |
+
"train_steps_per_second": 0.046
|
282 |
+
}
|
283 |
+
],
|
284 |
+
"max_steps": 22128,
|
285 |
+
"num_train_epochs": 2,
|
286 |
+
"total_flos": 6.662030063085158e+16,
|
287 |
+
"trial_name": null,
|
288 |
+
"trial_params": null
|
289 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0890f8a5efa1bdca596e7c726964dc8817011914a614ad6704f0500520ac917a
|
3 |
+
size 2735
|
tune_qa.sh
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BASE_MODEL=microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext
|
2 |
+
OUTPUT_DIR=~/Documents/projects/tunned_models/ms_pubmed_bert_squadv2/
|
3 |
+
|
4 |
+
python run_qa.py \
|
5 |
+
--model_name_or_path $BASE_MODEL\
|
6 |
+
--dataset_name squad_v2 \
|
7 |
+
--do_train \
|
8 |
+
--do_eval \
|
9 |
+
--version_2_with_negative \
|
10 |
+
--per_device_train_batch_size 12 \
|
11 |
+
--learning_rate 3e-5 \
|
12 |
+
--num_train_epochs 2 \
|
13 |
+
--max_seq_length 384 \
|
14 |
+
--doc_stride 128 \
|
15 |
+
--output_dir $OUTPUT_DIR
|
16 |
+
|