Euanyu commited on
Commit
7d4c357
1 Parent(s): 551e0f8

pubmedbert finetuned model on synthetic data

Browse files
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
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
+ "id2label": {
12
+ "0": "medical",
13
+ "1": "non-medical"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "false": 0,
19
+ "true": 1
20
+ },
21
+ "layer_norm_eps": 1e-12,
22
+ "max_position_embeddings": 512,
23
+ "model_type": "bert",
24
+ "num_attention_heads": 12,
25
+ "num_hidden_layers": 12,
26
+ "pad_token_id": 0,
27
+ "position_embedding_type": "absolute",
28
+ "problem_type": "single_label_classification",
29
+ "torch_dtype": "float32",
30
+ "transformers_version": "4.42.4",
31
+ "type_vocab_size": 2,
32
+ "use_cache": true,
33
+ "vocab_size": 30522
34
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb34b1e38284536062f0fd88282fd8a00f4808070e4b1ad0f25d2317e1e7a9d5
3
+ size 437958648
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24219c04611344a883c18bf1edf8166da0ba01769ddf72b4ebc00b02b154daa4
3
+ size 876038394
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6c9d6b7ddb46e6f6ce8a314b070515c1303e9c8eb3a9acef0ea2ac4ca5bd792
3
+ size 14244
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b957cec6154bcedd6e0296ef5735a7871ef230fe46097ee439ea17aba9b686ba
3
+ size 1064
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 1000000000000000019884624838656,
50
+ "never_split": null,
51
+ "pad_token": "[PAD]",
52
+ "sep_token": "[SEP]",
53
+ "strip_accents": null,
54
+ "tokenize_chinese_chars": true,
55
+ "tokenizer_class": "BertTokenizer",
56
+ "unk_token": "[UNK]"
57
+ }
trainer_state.json ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.1734582930803299,
3
+ "best_model_checkpoint": "pubmedbert_caption_RTX6000/checkpoint-1230",
4
+ "epoch": 4.0,
5
+ "eval_steps": 500,
6
+ "global_step": 4920,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.4065040650406504,
13
+ "grad_norm": 4.645663738250732,
14
+ "learning_rate": 2.75609756097561e-05,
15
+ "loss": 0.2075,
16
+ "step": 500
17
+ },
18
+ {
19
+ "epoch": 0.8130081300813008,
20
+ "grad_norm": 5.587854385375977,
21
+ "learning_rate": 2.5121951219512197e-05,
22
+ "loss": 0.1702,
23
+ "step": 1000
24
+ },
25
+ {
26
+ "epoch": 1.0,
27
+ "eval_accuracy": 0.9332379102341274,
28
+ "eval_f1": 0.928674632625657,
29
+ "eval_f1_medical": 0.9467156262749898,
30
+ "eval_f1_non_medical": 0.9106336389763241,
31
+ "eval_loss": 0.1734582930803299,
32
+ "eval_precision": 0.9312915820758167,
33
+ "eval_recall": 0.9263152623151424,
34
+ "eval_runtime": 68.2248,
35
+ "eval_samples_per_second": 143.364,
36
+ "eval_steps_per_second": 4.485,
37
+ "step": 1230
38
+ },
39
+ {
40
+ "epoch": 1.2195121951219512,
41
+ "grad_norm": 2.3974437713623047,
42
+ "learning_rate": 2.2682926829268295e-05,
43
+ "loss": 0.1389,
44
+ "step": 1500
45
+ },
46
+ {
47
+ "epoch": 1.6260162601626016,
48
+ "grad_norm": 2.506718397140503,
49
+ "learning_rate": 2.024390243902439e-05,
50
+ "loss": 0.1184,
51
+ "step": 2000
52
+ },
53
+ {
54
+ "epoch": 2.0,
55
+ "eval_accuracy": 0.9309886514671302,
56
+ "eval_f1": 0.9269715540062402,
57
+ "eval_f1_medical": 0.9440993788819876,
58
+ "eval_f1_non_medical": 0.9098437291304928,
59
+ "eval_loss": 0.2099289894104004,
60
+ "eval_precision": 0.9254099444591377,
61
+ "eval_recall": 0.9286608969105821,
62
+ "eval_runtime": 67.9715,
63
+ "eval_samples_per_second": 143.899,
64
+ "eval_steps_per_second": 4.502,
65
+ "step": 2460
66
+ },
67
+ {
68
+ "epoch": 2.032520325203252,
69
+ "grad_norm": 6.744129180908203,
70
+ "learning_rate": 1.7804878048780488e-05,
71
+ "loss": 0.1077,
72
+ "step": 2500
73
+ },
74
+ {
75
+ "epoch": 2.4390243902439024,
76
+ "grad_norm": 6.095327377319336,
77
+ "learning_rate": 1.5365853658536586e-05,
78
+ "loss": 0.0688,
79
+ "step": 3000
80
+ },
81
+ {
82
+ "epoch": 2.845528455284553,
83
+ "grad_norm": 3.4065370559692383,
84
+ "learning_rate": 1.2926829268292684e-05,
85
+ "loss": 0.0746,
86
+ "step": 3500
87
+ },
88
+ {
89
+ "epoch": 3.0,
90
+ "eval_accuracy": 0.9324199979552193,
91
+ "eval_f1": 0.9280287669371694,
92
+ "eval_f1_medical": 0.9458063458227433,
93
+ "eval_f1_non_medical": 0.9102511880515954,
94
+ "eval_loss": 0.27543091773986816,
95
+ "eval_precision": 0.9291365269492087,
96
+ "eval_recall": 0.9269721217289725,
97
+ "eval_runtime": 68.447,
98
+ "eval_samples_per_second": 142.899,
99
+ "eval_steps_per_second": 4.471,
100
+ "step": 3690
101
+ },
102
+ {
103
+ "epoch": 3.252032520325203,
104
+ "grad_norm": 0.23066511750221252,
105
+ "learning_rate": 1.048780487804878e-05,
106
+ "loss": 0.0512,
107
+ "step": 4000
108
+ },
109
+ {
110
+ "epoch": 3.658536585365854,
111
+ "grad_norm": 3.5666403770446777,
112
+ "learning_rate": 8.048780487804879e-06,
113
+ "loss": 0.0439,
114
+ "step": 4500
115
+ },
116
+ {
117
+ "epoch": 4.0,
118
+ "eval_accuracy": 0.9324199979552193,
119
+ "eval_f1": 0.9285368368262559,
120
+ "eval_f1_medical": 0.9451952574413398,
121
+ "eval_f1_non_medical": 0.9118784162111718,
122
+ "eval_loss": 0.35453397035598755,
123
+ "eval_precision": 0.9267038108683107,
124
+ "eval_recall": 0.930549725836648,
125
+ "eval_runtime": 67.9947,
126
+ "eval_samples_per_second": 143.849,
127
+ "eval_steps_per_second": 4.5,
128
+ "step": 4920
129
+ }
130
+ ],
131
+ "logging_steps": 500,
132
+ "max_steps": 6150,
133
+ "num_input_tokens_seen": 0,
134
+ "num_train_epochs": 5,
135
+ "save_steps": 500,
136
+ "stateful_callbacks": {
137
+ "TrainerControl": {
138
+ "args": {
139
+ "should_epoch_stop": false,
140
+ "should_evaluate": false,
141
+ "should_log": false,
142
+ "should_save": true,
143
+ "should_training_stop": false
144
+ },
145
+ "attributes": {}
146
+ }
147
+ },
148
+ "total_flos": 3.436358649641088e+16,
149
+ "train_batch_size": 32,
150
+ "trial_name": null,
151
+ "trial_params": null
152
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58aefb422511a44b3f045188ce5a98fdd8106c308b3c35857de25134048a06fa
3
+ size 5176
vocab.txt ADDED
The diff for this file is too large to render. See raw diff