jialicheng commited on
Commit
ee872e9
1 Parent(s): 30befc0

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext
4
+ tags:
5
+ - generated_from_trainer
6
+ metrics:
7
+ - accuracy
8
+ model-index:
9
+ - name: ddi_42
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ # ddi_42
17
+
18
+ This model is a fine-tuned version of [microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext](https://huggingface.co/microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext) on the None dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.3300
21
+ - Accuracy: 0.9547
22
+
23
+ ## Model description
24
+
25
+ More information needed
26
+
27
+ ## Intended uses & limitations
28
+
29
+ More information needed
30
+
31
+ ## Training and evaluation data
32
+
33
+ More information needed
34
+
35
+ ## Training procedure
36
+
37
+ ### Training hyperparameters
38
+
39
+ The following hyperparameters were used during training:
40
+ - learning_rate: 5e-05
41
+ - train_batch_size: 32
42
+ - eval_batch_size: 256
43
+ - seed: 42
44
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
45
+ - lr_scheduler_type: linear
46
+ - num_epochs: 10
47
+
48
+ ### Training results
49
+
50
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy |
51
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|
52
+ | No log | 1.0 | 791 | 0.1947 | 0.9471 |
53
+ | 0.1709 | 2.0 | 1582 | 0.2474 | 0.9527 |
54
+ | 0.0734 | 3.0 | 2373 | 0.2485 | 0.9475 |
55
+ | 0.0475 | 4.0 | 3164 | 0.2686 | 0.9499 |
56
+ | 0.0475 | 5.0 | 3955 | 0.3196 | 0.9475 |
57
+ | 0.0284 | 6.0 | 4746 | 0.3014 | 0.9527 |
58
+ | 0.0194 | 7.0 | 5537 | 0.3125 | 0.9523 |
59
+ | 0.0133 | 8.0 | 6328 | 0.3641 | 0.9491 |
60
+ | 0.0065 | 9.0 | 7119 | 0.3300 | 0.9547 |
61
+ | 0.0065 | 10.0 | 7910 | 0.3502 | 0.9543 |
62
+
63
+
64
+ ### Framework versions
65
+
66
+ - Transformers 4.39.3
67
+ - Pytorch 2.2.2+cu118
68
+ - Datasets 2.18.0
69
+ - Tokenizers 0.15.2
all_results.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 10.0,
3
+ "eval_accuracy": 0.9547275641025641,
4
+ "eval_loss": 0.3299635350704193,
5
+ "eval_runtime": 4.9525,
6
+ "eval_samples": 25296,
7
+ "eval_samples_per_second": 503.99,
8
+ "eval_steps_per_second": 2.019,
9
+ "test_accuracy": 0.947515745276417,
10
+ "test_loss": 0.40029823780059814,
11
+ "test_runtime": 10.3731,
12
+ "test_samples_per_second": 551.038,
13
+ "test_steps_per_second": 2.217,
14
+ "train_accuracy": 0.9991698292220114,
15
+ "train_loss": 0.002276296028867364,
16
+ "train_runtime": 40.6031,
17
+ "train_samples": 25296,
18
+ "train_samples_per_second": 623.007,
19
+ "train_steps_per_second": 2.438
20
+ }
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "finetuning_task": "text-classification",
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0",
14
+ "1": "LABEL_1",
15
+ "2": "LABEL_2",
16
+ "3": "LABEL_3",
17
+ "4": "LABEL_4"
18
+ },
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "label2id": {
22
+ "0": 0,
23
+ "1": 1,
24
+ "2": 2,
25
+ "3": 3,
26
+ "4": 4
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "max_position_embeddings": 512,
30
+ "model_type": "bert",
31
+ "num_attention_heads": 12,
32
+ "num_hidden_layers": 12,
33
+ "pad_token_id": 0,
34
+ "position_embedding_type": "absolute",
35
+ "problem_type": "single_label_classification",
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.39.3",
38
+ "type_vocab_size": 2,
39
+ "use_cache": true,
40
+ "vocab_size": 30522
41
+ }
eval_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 10.0,
3
+ "eval_accuracy": 0.9547275641025641,
4
+ "eval_loss": 0.3299635350704193,
5
+ "eval_runtime": 4.9525,
6
+ "eval_samples": 2496,
7
+ "eval_samples_per_second": 503.99,
8
+ "eval_steps_per_second": 2.019
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e1d878bba795edd7a5272e3ee922827866a61d9e41243233be61ab9f756f42d
3
+ size 437967876
pred_logit_eval.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17d1d717d0deeedc20d8c035b7c48de5b4c25f7e75fdcf077e3bc16038eb4268
3
+ size 50048
pred_logit_test.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3b64ab8c89f2134f96b6c121aa574cb8b09b81bf61ffce47e8208d6f490330f
3
+ size 114448
pred_logit_train.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6319821e0cdf80d556c13b128714327cce202217065ee9eb94d88b89d5e5c097
3
+ size 506048
runs/Apr27_05-49-22_clu/events.out.tfevents.1714196981.clu ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de062eb1830c0fa104368adbe3afd101e2ca69e1f6aa866efb5fd5181eda2ee0
3
+ size 10030
runs/Apr27_05-49-22_clu/events.out.tfevents.1714198415.clu ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8606758a7cd90f4665e25585c1fd0235b22a4fd867093b0dece4fe59f7b2cf27
3
+ size 1044
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
+ }
test_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 10.0,
3
+ "eval_samples": 5716,
4
+ "test_accuracy": 0.947515745276417,
5
+ "test_loss": 0.40029823780059814,
6
+ "test_runtime": 10.3731,
7
+ "test_samples_per_second": 551.038,
8
+ "test_steps_per_second": 2.217
9
+ }
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
+ }
train_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 10.0,
3
+ "eval_samples": 25296,
4
+ "train_accuracy": 0.9991698292220114,
5
+ "train_loss": 0.002276296028867364,
6
+ "train_runtime": 40.6031,
7
+ "train_samples_per_second": 623.007,
8
+ "train_steps_per_second": 2.438
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.9547275641025641,
3
+ "best_model_checkpoint": "text/train/checkpoint/pubmedbert-fulltext/ddi_42/checkpoint-7119",
4
+ "epoch": 10.0,
5
+ "eval_steps": 500,
6
+ "global_step": 7910,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 1.0,
13
+ "eval_accuracy": 0.9471153846153846,
14
+ "eval_loss": 0.19469894468784332,
15
+ "eval_runtime": 5.2082,
16
+ "eval_samples_per_second": 479.246,
17
+ "eval_steps_per_second": 1.92,
18
+ "step": 791
19
+ },
20
+ {
21
+ "epoch": 1.26,
22
+ "grad_norm": 8.167149543762207,
23
+ "learning_rate": 4.367888748419722e-05,
24
+ "loss": 0.1709,
25
+ "step": 1000
26
+ },
27
+ {
28
+ "epoch": 2.0,
29
+ "eval_accuracy": 0.9527243589743589,
30
+ "eval_loss": 0.2473936378955841,
31
+ "eval_runtime": 4.9302,
32
+ "eval_samples_per_second": 506.267,
33
+ "eval_steps_per_second": 2.028,
34
+ "step": 1582
35
+ },
36
+ {
37
+ "epoch": 2.53,
38
+ "grad_norm": 0.3635082244873047,
39
+ "learning_rate": 3.735777496839444e-05,
40
+ "loss": 0.0734,
41
+ "step": 2000
42
+ },
43
+ {
44
+ "epoch": 3.0,
45
+ "eval_accuracy": 0.9475160256410257,
46
+ "eval_loss": 0.24853640794754028,
47
+ "eval_runtime": 4.9236,
48
+ "eval_samples_per_second": 506.945,
49
+ "eval_steps_per_second": 2.031,
50
+ "step": 2373
51
+ },
52
+ {
53
+ "epoch": 3.79,
54
+ "grad_norm": 7.960566520690918,
55
+ "learning_rate": 3.1036662452591655e-05,
56
+ "loss": 0.0475,
57
+ "step": 3000
58
+ },
59
+ {
60
+ "epoch": 4.0,
61
+ "eval_accuracy": 0.9499198717948718,
62
+ "eval_loss": 0.26862233877182007,
63
+ "eval_runtime": 4.8986,
64
+ "eval_samples_per_second": 509.536,
65
+ "eval_steps_per_second": 2.041,
66
+ "step": 3164
67
+ },
68
+ {
69
+ "epoch": 5.0,
70
+ "eval_accuracy": 0.9475160256410257,
71
+ "eval_loss": 0.3195907175540924,
72
+ "eval_runtime": 4.8903,
73
+ "eval_samples_per_second": 510.395,
74
+ "eval_steps_per_second": 2.045,
75
+ "step": 3955
76
+ },
77
+ {
78
+ "epoch": 5.06,
79
+ "grad_norm": 0.0017318876925855875,
80
+ "learning_rate": 2.4715549936788876e-05,
81
+ "loss": 0.0284,
82
+ "step": 4000
83
+ },
84
+ {
85
+ "epoch": 6.0,
86
+ "eval_accuracy": 0.9527243589743589,
87
+ "eval_loss": 0.3014063239097595,
88
+ "eval_runtime": 4.8924,
89
+ "eval_samples_per_second": 510.174,
90
+ "eval_steps_per_second": 2.044,
91
+ "step": 4746
92
+ },
93
+ {
94
+ "epoch": 6.32,
95
+ "grad_norm": 0.025161907076835632,
96
+ "learning_rate": 1.8394437420986094e-05,
97
+ "loss": 0.0194,
98
+ "step": 5000
99
+ },
100
+ {
101
+ "epoch": 7.0,
102
+ "eval_accuracy": 0.952323717948718,
103
+ "eval_loss": 0.3125186860561371,
104
+ "eval_runtime": 4.9579,
105
+ "eval_samples_per_second": 503.443,
106
+ "eval_steps_per_second": 2.017,
107
+ "step": 5537
108
+ },
109
+ {
110
+ "epoch": 7.59,
111
+ "grad_norm": 0.21671424806118011,
112
+ "learning_rate": 1.2073324905183313e-05,
113
+ "loss": 0.0133,
114
+ "step": 6000
115
+ },
116
+ {
117
+ "epoch": 8.0,
118
+ "eval_accuracy": 0.9491185897435898,
119
+ "eval_loss": 0.3640977442264557,
120
+ "eval_runtime": 4.9394,
121
+ "eval_samples_per_second": 505.32,
122
+ "eval_steps_per_second": 2.025,
123
+ "step": 6328
124
+ },
125
+ {
126
+ "epoch": 8.85,
127
+ "grad_norm": 0.002933135023340583,
128
+ "learning_rate": 5.752212389380531e-06,
129
+ "loss": 0.0065,
130
+ "step": 7000
131
+ },
132
+ {
133
+ "epoch": 9.0,
134
+ "eval_accuracy": 0.9547275641025641,
135
+ "eval_loss": 0.3299635350704193,
136
+ "eval_runtime": 4.8971,
137
+ "eval_samples_per_second": 509.686,
138
+ "eval_steps_per_second": 2.042,
139
+ "step": 7119
140
+ },
141
+ {
142
+ "epoch": 10.0,
143
+ "eval_accuracy": 0.9543269230769231,
144
+ "eval_loss": 0.3501527011394501,
145
+ "eval_runtime": 4.9496,
146
+ "eval_samples_per_second": 504.282,
147
+ "eval_steps_per_second": 2.02,
148
+ "step": 7910
149
+ },
150
+ {
151
+ "epoch": 10.0,
152
+ "step": 7910,
153
+ "total_flos": 1.663959132942336e+16,
154
+ "train_loss": 0.04588771306458677,
155
+ "train_runtime": 1428.2798,
156
+ "train_samples_per_second": 177.108,
157
+ "train_steps_per_second": 5.538
158
+ }
159
+ ],
160
+ "logging_steps": 1000,
161
+ "max_steps": 7910,
162
+ "num_input_tokens_seen": 0,
163
+ "num_train_epochs": 10,
164
+ "save_steps": 500,
165
+ "total_flos": 1.663959132942336e+16,
166
+ "train_batch_size": 32,
167
+ "trial_name": null,
168
+ "trial_params": null
169
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b604336e5303a5987dd2272e4fa97c85c421f495d21a3ecb2720fd7a2daf98d3
3
+ size 5048
vocab.txt ADDED
The diff for this file is too large to render. See raw diff