pritamdeka commited on
Commit
843a927
1 Parent(s): 40ed2c8

Initial Commit

Browse files
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - generated_from_trainer
5
+ datasets:
6
+ - pritamdeka/cord-19-abstract
7
+ metrics:
8
+ - accuracy
9
+ model-index:
10
+ - name: pubmedbert-abstract-cord19
11
+ results:
12
+ - task:
13
+ name: Masked Language Modeling
14
+ type: fill-mask
15
+ dataset:
16
+ name: pritamdeka/cord-19-abstract
17
+ type: pritamdeka/cord-19-abstract
18
+ args: fulltext
19
+ metrics:
20
+ - name: Accuracy
21
+ type: accuracy
22
+ value: 0.7246798699728464
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-abstract-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-abstract dataset.
31
+ It achieves the following results on the evaluation set:
32
+ - Loss: 1.2371
33
+ - Accuracy: 0.7247
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.95) and epsilon=1e-08
57
+ - lr_scheduler_type: linear
58
+ - lr_scheduler_warmup_steps: 10000
59
+ - num_epochs: 4.0
60
+ - mixed_precision_training: Native AMP
61
+
62
+ ### Training results
63
+
64
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
65
+ |:-------------:|:-----:|:-----:|:---------------:|:--------:|
66
+ | 1.27 | 0.53 | 5000 | 1.2425 | 0.7236 |
67
+ | 1.2634 | 1.06 | 10000 | 1.3123 | 0.7141 |
68
+ | 1.3041 | 1.59 | 15000 | 1.3583 | 0.7072 |
69
+ | 1.3829 | 2.12 | 20000 | 1.3590 | 0.7121 |
70
+ | 1.3069 | 2.65 | 25000 | 1.3506 | 0.7154 |
71
+ | 1.2921 | 3.18 | 30000 | 1.3448 | 0.7160 |
72
+ | 1.2731 | 3.7 | 35000 | 1.3375 | 0.7178 |
73
+
74
+
75
+ ### Framework versions
76
+
77
+ - Transformers 4.17.0.dev0
78
+ - Pytorch 1.10.0+cu111
79
+ - Datasets 1.18.3
80
+ - Tokenizers 0.11.0
all_results.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 4.0,
3
+ "eval_accuracy": 0.7246798699728464,
4
+ "eval_loss": 1.2370661497116089,
5
+ "eval_runtime": 183.5428,
6
+ "eval_samples": 8110,
7
+ "eval_samples_per_second": 44.186,
8
+ "eval_steps_per_second": 2.762,
9
+ "perplexity": 3.445490069726643,
10
+ "train_loss": 1.2965481223991413,
11
+ "train_runtime": 37723.3327,
12
+ "train_samples": 151146,
13
+ "train_samples_per_second": 16.027,
14
+ "train_steps_per_second": 1.002
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": 4.0,
3
+ "eval_accuracy": 0.7246798699728464,
4
+ "eval_loss": 1.2370661497116089,
5
+ "eval_runtime": 183.5428,
6
+ "eval_samples": 8110,
7
+ "eval_samples_per_second": 44.186,
8
+ "eval_steps_per_second": 2.762,
9
+ "perplexity": 3.445490069726643
10
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf6a91f5d74dc8bc3e66db684ecb445897af04b9ebe460eae4fc36436e3e5ae3
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": 4.0,
3
+ "train_loss": 1.2965481223991413,
4
+ "train_runtime": 37723.3327,
5
+ "train_samples": 151146,
6
+ "train_samples_per_second": 16.027,
7
+ "train_steps_per_second": 1.002
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 1.2424818277359009,
3
+ "best_model_checkpoint": "/content/pubmedbert-abstract-cord19/checkpoint-5000",
4
+ "epoch": 4.0,
5
+ "global_step": 37788,
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.53,
12
+ "learning_rate": 2.4970000000000003e-05,
13
+ "loss": 1.27,
14
+ "step": 5000
15
+ },
16
+ {
17
+ "epoch": 0.53,
18
+ "eval_accuracy": 0.7236279677533664,
19
+ "eval_loss": 1.2424818277359009,
20
+ "eval_runtime": 183.46,
21
+ "eval_samples_per_second": 44.206,
22
+ "eval_steps_per_second": 2.764,
23
+ "step": 5000
24
+ },
25
+ {
26
+ "epoch": 1.06,
27
+ "learning_rate": 4.9965e-05,
28
+ "loss": 1.2634,
29
+ "step": 10000
30
+ },
31
+ {
32
+ "epoch": 1.06,
33
+ "eval_accuracy": 0.7140570760001546,
34
+ "eval_loss": 1.312286138534546,
35
+ "eval_runtime": 183.3534,
36
+ "eval_samples_per_second": 44.232,
37
+ "eval_steps_per_second": 2.765,
38
+ "step": 10000
39
+ },
40
+ {
41
+ "epoch": 1.59,
42
+ "learning_rate": 4.1024902835756445e-05,
43
+ "loss": 1.3041,
44
+ "step": 15000
45
+ },
46
+ {
47
+ "epoch": 1.59,
48
+ "eval_accuracy": 0.7072068247593172,
49
+ "eval_loss": 1.3583375215530396,
50
+ "eval_runtime": 183.3479,
51
+ "eval_samples_per_second": 44.233,
52
+ "eval_steps_per_second": 2.765,
53
+ "step": 15000
54
+ },
55
+ {
56
+ "epoch": 2.12,
57
+ "learning_rate": 3.2033611630919824e-05,
58
+ "loss": 1.3829,
59
+ "step": 20000
60
+ },
61
+ {
62
+ "epoch": 2.12,
63
+ "eval_accuracy": 0.7120832508972437,
64
+ "eval_loss": 1.3589657545089722,
65
+ "eval_runtime": 183.3751,
66
+ "eval_samples_per_second": 44.226,
67
+ "eval_steps_per_second": 2.765,
68
+ "step": 20000
69
+ },
70
+ {
71
+ "epoch": 2.65,
72
+ "learning_rate": 2.303692241255218e-05,
73
+ "loss": 1.3069,
74
+ "step": 25000
75
+ },
76
+ {
77
+ "epoch": 2.65,
78
+ "eval_accuracy": 0.7153998687867195,
79
+ "eval_loss": 1.3505500555038452,
80
+ "eval_runtime": 183.3915,
81
+ "eval_samples_per_second": 44.222,
82
+ "eval_steps_per_second": 2.765,
83
+ "step": 25000
84
+ },
85
+ {
86
+ "epoch": 3.18,
87
+ "learning_rate": 1.4040233194184541e-05,
88
+ "loss": 1.2921,
89
+ "step": 30000
90
+ },
91
+ {
92
+ "epoch": 3.18,
93
+ "eval_accuracy": 0.7159658967235916,
94
+ "eval_loss": 1.3447710275650024,
95
+ "eval_runtime": 183.3443,
96
+ "eval_samples_per_second": 44.234,
97
+ "eval_steps_per_second": 2.765,
98
+ "step": 30000
99
+ },
100
+ {
101
+ "epoch": 3.7,
102
+ "learning_rate": 5.0471426515042465e-06,
103
+ "loss": 1.2731,
104
+ "step": 35000
105
+ },
106
+ {
107
+ "epoch": 3.7,
108
+ "eval_accuracy": 0.7177905274023574,
109
+ "eval_loss": 1.3374903202056885,
110
+ "eval_runtime": 183.3182,
111
+ "eval_samples_per_second": 44.24,
112
+ "eval_steps_per_second": 2.766,
113
+ "step": 35000
114
+ },
115
+ {
116
+ "epoch": 4.0,
117
+ "step": 37788,
118
+ "total_flos": 1.3985984051532e+17,
119
+ "train_loss": 1.2965481223991413,
120
+ "train_runtime": 37723.3327,
121
+ "train_samples_per_second": 16.027,
122
+ "train_steps_per_second": 1.002
123
+ }
124
+ ],
125
+ "max_steps": 37788,
126
+ "num_train_epochs": 4,
127
+ "total_flos": 1.3985984051532e+17,
128
+ "trial_name": null,
129
+ "trial_params": null
130
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3fcee15797b8744d6ddeafec41ef0bee56e60b9c2db01a49d7d382a578693e5
3
+ size 3055
vocab.txt ADDED
The diff for this file is too large to render. See raw diff