pritamdeka
commited on
Commit
·
06ce6e0
1
Parent(s):
2ae9a40
Initial Commit
Browse files- README.md +84 -0
- all_results.json +15 -0
- config.json +25 -0
- eval_results.json +10 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- train_results.json +8 -0
- trainer_state.json +190 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- pritamdeka/cord-19-fulltext
|
7 |
+
metrics:
|
8 |
+
- accuracy
|
9 |
+
model-index:
|
10 |
+
- name: pubmedbert-fulltext-cord19
|
11 |
+
results:
|
12 |
+
- task:
|
13 |
+
name: Masked Language Modeling
|
14 |
+
type: fill-mask
|
15 |
+
dataset:
|
16 |
+
name: pritamdeka/cord-19-fulltext
|
17 |
+
type: pritamdeka/cord-19-fulltext
|
18 |
+
args: fulltext
|
19 |
+
metrics:
|
20 |
+
- name: Accuracy
|
21 |
+
type: accuracy
|
22 |
+
value: 0.7175316733550737
|
23 |
+
---
|
24 |
+
|
25 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
26 |
+
should probably proofread and complete it, then remove this comment. -->
|
27 |
+
|
28 |
+
# pubmedbert-fulltext-cord19
|
29 |
+
|
30 |
+
This model is a fine-tuned version of [microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext](https://huggingface.co/microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext) on the pritamdeka/cord-19-fulltext dataset.
|
31 |
+
It achieves the following results on the evaluation set:
|
32 |
+
- Loss: 1.2667
|
33 |
+
- Accuracy: 0.7175
|
34 |
+
|
35 |
+
## Model description
|
36 |
+
|
37 |
+
More information needed
|
38 |
+
|
39 |
+
## Intended uses & limitations
|
40 |
+
|
41 |
+
More information needed
|
42 |
+
|
43 |
+
## Training and evaluation data
|
44 |
+
|
45 |
+
More information needed
|
46 |
+
|
47 |
+
## Training procedure
|
48 |
+
|
49 |
+
### Training hyperparameters
|
50 |
+
|
51 |
+
The following hyperparameters were used during training:
|
52 |
+
- learning_rate: 5e-05
|
53 |
+
- train_batch_size: 16
|
54 |
+
- eval_batch_size: 16
|
55 |
+
- seed: 42
|
56 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
57 |
+
- lr_scheduler_type: linear
|
58 |
+
- lr_scheduler_warmup_steps: 10000
|
59 |
+
- num_epochs: 3.0
|
60 |
+
- mixed_precision_training: Native AMP
|
61 |
+
|
62 |
+
### Training results
|
63 |
+
|
64 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
65 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
|
66 |
+
| 1.7985 | 0.27 | 5000 | 1.2710 | 0.7176 |
|
67 |
+
| 1.7542 | 0.53 | 10000 | 1.3359 | 0.7070 |
|
68 |
+
| 1.7462 | 0.8 | 15000 | 1.3489 | 0.7034 |
|
69 |
+
| 1.8371 | 1.07 | 20000 | 1.4361 | 0.6891 |
|
70 |
+
| 1.7102 | 1.33 | 25000 | 1.3502 | 0.7039 |
|
71 |
+
| 1.6596 | 1.6 | 30000 | 1.3341 | 0.7065 |
|
72 |
+
| 1.6265 | 1.87 | 35000 | 1.3228 | 0.7087 |
|
73 |
+
| 1.605 | 2.13 | 40000 | 1.3079 | 0.7099 |
|
74 |
+
| 1.5731 | 2.4 | 45000 | 1.2986 | 0.7121 |
|
75 |
+
| 1.5602 | 2.67 | 50000 | 1.2929 | 0.7136 |
|
76 |
+
| 1.5447 | 2.93 | 55000 | 1.2875 | 0.7143 |
|
77 |
+
|
78 |
+
|
79 |
+
### Framework versions
|
80 |
+
|
81 |
+
- Transformers 4.17.0.dev0
|
82 |
+
- Pytorch 1.10.0+cu111
|
83 |
+
- Datasets 1.18.3
|
84 |
+
- Tokenizers 0.11.0
|
all_results.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.7175316733550737,
|
4 |
+
"eval_loss": 1.2667090892791748,
|
5 |
+
"eval_runtime": 290.3233,
|
6 |
+
"eval_samples": 25000,
|
7 |
+
"eval_samples_per_second": 86.111,
|
8 |
+
"eval_steps_per_second": 5.384,
|
9 |
+
"perplexity": 3.549153375531065,
|
10 |
+
"train_loss": 1.6709515473090277,
|
11 |
+
"train_runtime": 32029.5992,
|
12 |
+
"train_samples": 300000,
|
13 |
+
"train_samples_per_second": 28.099,
|
14 |
+
"train_steps_per_second": 1.756
|
15 |
+
}
|
config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext",
|
3 |
+
"architectures": [
|
4 |
+
"BertForMaskedLM"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 3072,
|
13 |
+
"layer_norm_eps": 1e-12,
|
14 |
+
"max_position_embeddings": 512,
|
15 |
+
"model_type": "bert",
|
16 |
+
"num_attention_heads": 12,
|
17 |
+
"num_hidden_layers": 12,
|
18 |
+
"pad_token_id": 0,
|
19 |
+
"position_embedding_type": "absolute",
|
20 |
+
"torch_dtype": "float32",
|
21 |
+
"transformers_version": "4.17.0.dev0",
|
22 |
+
"type_vocab_size": 2,
|
23 |
+
"use_cache": true,
|
24 |
+
"vocab_size": 30522
|
25 |
+
}
|
eval_results.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"eval_accuracy": 0.7175316733550737,
|
4 |
+
"eval_loss": 1.2667090892791748,
|
5 |
+
"eval_runtime": 290.3233,
|
6 |
+
"eval_samples": 25000,
|
7 |
+
"eval_samples_per_second": 86.111,
|
8 |
+
"eval_steps_per_second": 5.384,
|
9 |
+
"perplexity": 3.549153375531065
|
10 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9de4e6b38a338718fe5b5c173b47a07e06c3c23bb05d3f1dd34136e0592278e5
|
3 |
+
size 438141995
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "special_tokens_map_file": null, "name_or_path": "microsoft/BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext", "do_basic_tokenize": true, "never_split": null, "tokenizer_class": "BertTokenizer"}
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"epoch": 3.0,
|
3 |
+
"train_loss": 1.6709515473090277,
|
4 |
+
"train_runtime": 32029.5992,
|
5 |
+
"train_samples": 300000,
|
6 |
+
"train_samples_per_second": 28.099,
|
7 |
+
"train_steps_per_second": 1.756
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": 1.2710014581680298,
|
3 |
+
"best_model_checkpoint": "/content/pubmedbert-fulltext-cord19/checkpoint-5000",
|
4 |
+
"epoch": 3.0,
|
5 |
+
"global_step": 56250,
|
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.27,
|
12 |
+
"learning_rate": 2.4970000000000003e-05,
|
13 |
+
"loss": 1.7985,
|
14 |
+
"step": 5000
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"epoch": 0.27,
|
18 |
+
"eval_accuracy": 0.7176016320015706,
|
19 |
+
"eval_loss": 1.2710014581680298,
|
20 |
+
"eval_runtime": 289.9232,
|
21 |
+
"eval_samples_per_second": 86.23,
|
22 |
+
"eval_steps_per_second": 5.391,
|
23 |
+
"step": 5000
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 0.53,
|
27 |
+
"learning_rate": 4.9965e-05,
|
28 |
+
"loss": 1.7542,
|
29 |
+
"step": 10000
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"epoch": 0.53,
|
33 |
+
"eval_accuracy": 0.7069832712721614,
|
34 |
+
"eval_loss": 1.3359251022338867,
|
35 |
+
"eval_runtime": 290.2058,
|
36 |
+
"eval_samples_per_second": 86.146,
|
37 |
+
"eval_steps_per_second": 5.386,
|
38 |
+
"step": 10000
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"epoch": 0.8,
|
42 |
+
"learning_rate": 4.460432432432432e-05,
|
43 |
+
"loss": 1.7462,
|
44 |
+
"step": 15000
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 0.8,
|
48 |
+
"eval_accuracy": 0.7034289815931059,
|
49 |
+
"eval_loss": 1.3488777875900269,
|
50 |
+
"eval_runtime": 290.0812,
|
51 |
+
"eval_samples_per_second": 86.183,
|
52 |
+
"eval_steps_per_second": 5.388,
|
53 |
+
"step": 15000
|
54 |
+
},
|
55 |
+
{
|
56 |
+
"epoch": 1.07,
|
57 |
+
"learning_rate": 3.9202162162162166e-05,
|
58 |
+
"loss": 1.8371,
|
59 |
+
"step": 20000
|
60 |
+
},
|
61 |
+
{
|
62 |
+
"epoch": 1.07,
|
63 |
+
"eval_accuracy": 0.6891450706903661,
|
64 |
+
"eval_loss": 1.436103105545044,
|
65 |
+
"eval_runtime": 289.9321,
|
66 |
+
"eval_samples_per_second": 86.227,
|
67 |
+
"eval_steps_per_second": 5.391,
|
68 |
+
"step": 20000
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"epoch": 1.33,
|
72 |
+
"learning_rate": 3.379675675675676e-05,
|
73 |
+
"loss": 1.7102,
|
74 |
+
"step": 25000
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"epoch": 1.33,
|
78 |
+
"eval_accuracy": 0.7039453286069087,
|
79 |
+
"eval_loss": 1.3501886129379272,
|
80 |
+
"eval_runtime": 289.995,
|
81 |
+
"eval_samples_per_second": 86.208,
|
82 |
+
"eval_steps_per_second": 5.39,
|
83 |
+
"step": 25000
|
84 |
+
},
|
85 |
+
{
|
86 |
+
"epoch": 1.6,
|
87 |
+
"learning_rate": 2.8393513513513515e-05,
|
88 |
+
"loss": 1.6596,
|
89 |
+
"step": 30000
|
90 |
+
},
|
91 |
+
{
|
92 |
+
"epoch": 1.6,
|
93 |
+
"eval_accuracy": 0.70652987764824,
|
94 |
+
"eval_loss": 1.334069013595581,
|
95 |
+
"eval_runtime": 290.2224,
|
96 |
+
"eval_samples_per_second": 86.141,
|
97 |
+
"eval_steps_per_second": 5.386,
|
98 |
+
"step": 30000
|
99 |
+
},
|
100 |
+
{
|
101 |
+
"epoch": 1.87,
|
102 |
+
"learning_rate": 2.2990270270270274e-05,
|
103 |
+
"loss": 1.6265,
|
104 |
+
"step": 35000
|
105 |
+
},
|
106 |
+
{
|
107 |
+
"epoch": 1.87,
|
108 |
+
"eval_accuracy": 0.708723656830319,
|
109 |
+
"eval_loss": 1.322791576385498,
|
110 |
+
"eval_runtime": 291.0022,
|
111 |
+
"eval_samples_per_second": 85.91,
|
112 |
+
"eval_steps_per_second": 5.371,
|
113 |
+
"step": 35000
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"epoch": 2.13,
|
117 |
+
"learning_rate": 1.7584864864864868e-05,
|
118 |
+
"loss": 1.605,
|
119 |
+
"step": 40000
|
120 |
+
},
|
121 |
+
{
|
122 |
+
"epoch": 2.13,
|
123 |
+
"eval_accuracy": 0.7099296658889697,
|
124 |
+
"eval_loss": 1.307939052581787,
|
125 |
+
"eval_runtime": 290.1974,
|
126 |
+
"eval_samples_per_second": 86.148,
|
127 |
+
"eval_steps_per_second": 5.386,
|
128 |
+
"step": 40000
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 2.4,
|
132 |
+
"learning_rate": 1.2181621621621623e-05,
|
133 |
+
"loss": 1.5731,
|
134 |
+
"step": 45000
|
135 |
+
},
|
136 |
+
{
|
137 |
+
"epoch": 2.4,
|
138 |
+
"eval_accuracy": 0.7121370440536863,
|
139 |
+
"eval_loss": 1.2985501289367676,
|
140 |
+
"eval_runtime": 290.9835,
|
141 |
+
"eval_samples_per_second": 85.916,
|
142 |
+
"eval_steps_per_second": 5.371,
|
143 |
+
"step": 45000
|
144 |
+
},
|
145 |
+
{
|
146 |
+
"epoch": 2.67,
|
147 |
+
"learning_rate": 6.778378378378379e-06,
|
148 |
+
"loss": 1.5602,
|
149 |
+
"step": 50000
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"epoch": 2.67,
|
153 |
+
"eval_accuracy": 0.7135782251340592,
|
154 |
+
"eval_loss": 1.2928680181503296,
|
155 |
+
"eval_runtime": 290.2984,
|
156 |
+
"eval_samples_per_second": 86.118,
|
157 |
+
"eval_steps_per_second": 5.384,
|
158 |
+
"step": 50000
|
159 |
+
},
|
160 |
+
{
|
161 |
+
"epoch": 2.93,
|
162 |
+
"learning_rate": 1.3762162162162162e-06,
|
163 |
+
"loss": 1.5447,
|
164 |
+
"step": 55000
|
165 |
+
},
|
166 |
+
{
|
167 |
+
"epoch": 2.93,
|
168 |
+
"eval_accuracy": 0.7142735090199965,
|
169 |
+
"eval_loss": 1.2874841690063477,
|
170 |
+
"eval_runtime": 290.4326,
|
171 |
+
"eval_samples_per_second": 86.078,
|
172 |
+
"eval_steps_per_second": 5.382,
|
173 |
+
"step": 55000
|
174 |
+
},
|
175 |
+
{
|
176 |
+
"epoch": 3.0,
|
177 |
+
"step": 56250,
|
178 |
+
"total_flos": 1.156661775e+17,
|
179 |
+
"train_loss": 1.6709515473090277,
|
180 |
+
"train_runtime": 32029.5992,
|
181 |
+
"train_samples_per_second": 28.099,
|
182 |
+
"train_steps_per_second": 1.756
|
183 |
+
}
|
184 |
+
],
|
185 |
+
"max_steps": 56250,
|
186 |
+
"num_train_epochs": 3,
|
187 |
+
"total_flos": 1.156661775e+17,
|
188 |
+
"trial_name": null,
|
189 |
+
"trial_params": null
|
190 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:32791723132d9fc18f04a12e5de8e21d799f30360d75d11d4180d5cf9a33a815
|
3 |
+
size 3055
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|