jialicheng commited on
Commit
a9979c8
1 Parent(s): 822c5ab

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
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](https://huggingface.co/microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract) on the None dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.2085
21
+ - Accuracy: 0.9551
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.1986 | 0.9383 |
53
+ | 0.1723 | 2.0 | 1582 | 0.2700 | 0.9455 |
54
+ | 0.0772 | 3.0 | 2373 | 0.2085 | 0.9551 |
55
+ | 0.0516 | 4.0 | 3164 | 0.2970 | 0.9427 |
56
+ | 0.0516 | 5.0 | 3955 | 0.2620 | 0.9539 |
57
+ | 0.0341 | 6.0 | 4746 | 0.3973 | 0.9423 |
58
+ | 0.0203 | 7.0 | 5537 | 0.3637 | 0.9423 |
59
+ | 0.0146 | 8.0 | 6328 | 0.4154 | 0.9451 |
60
+ | 0.007 | 9.0 | 7119 | 0.4219 | 0.9463 |
61
+ | 0.007 | 10.0 | 7910 | 0.4098 | 0.9447 |
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.9551282051282052,
4
+ "eval_loss": 0.20845328271389008,
5
+ "eval_runtime": 4.9096,
6
+ "eval_samples": 25296,
7
+ "eval_samples_per_second": 508.388,
8
+ "eval_steps_per_second": 2.037,
9
+ "test_accuracy": 0.9391182645206438,
10
+ "test_loss": 0.3346391022205353,
11
+ "test_runtime": 9.9095,
12
+ "test_samples_per_second": 576.823,
13
+ "test_steps_per_second": 2.321,
14
+ "train_accuracy": 0.9922912713472486,
15
+ "train_loss": 0.03253408521413803,
16
+ "train_runtime": 40.6672,
17
+ "train_samples": 25296,
18
+ "train_samples_per_second": 622.025,
19
+ "train_steps_per_second": 2.434
20
+ }
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/BiomedNLP-BiomedBERT-base-uncased-abstract",
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.9551282051282052,
4
+ "eval_loss": 0.20845328271389008,
5
+ "eval_runtime": 4.9096,
6
+ "eval_samples": 2496,
7
+ "eval_samples_per_second": 508.388,
8
+ "eval_steps_per_second": 2.037
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8057e2d26cccbc75703b20f2c650e0332ed275e6f805e991e284c0e4044a8905
3
+ size 437967876
pred_logit_eval.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f136441d59211f3ef7c46ece76cfa43f72aff95f9bf89f08a9e498b737ae4c71
3
+ size 50048
pred_logit_test.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3e9f84d3a6af45c1dfaac187bf20245f80c41373b5675cebf69840e21313f0c
3
+ size 114448
pred_logit_train.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c30b00c8ac7b65f9f249b5e68a343ea18ecde68212fdc139dd330614ac84a4be
3
+ size 506048
runs/Apr27_03-43-38_clu/events.out.tfevents.1714189438.clu ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33d109447de018595ea36c85d6ab8cdd9dab21ca67f60970ef956be8adb680fd
3
+ size 10021
runs/Apr27_03-43-38_clu/events.out.tfevents.1714190869.clu ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b72bb2cea2e520b69634cc82e12d77526e29bceab32a827e3b09402a5f403e2
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.9391182645206438,
5
+ "test_loss": 0.3346391022205353,
6
+ "test_runtime": 9.9095,
7
+ "test_samples_per_second": 576.823,
8
+ "test_steps_per_second": 2.321
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.9922912713472486,
5
+ "train_loss": 0.03253408521413803,
6
+ "train_runtime": 40.6672,
7
+ "train_samples_per_second": 622.025,
8
+ "train_steps_per_second": 2.434
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.9551282051282052,
3
+ "best_model_checkpoint": "text/train/checkpoint/pubmedbert-abstract/ddi_42/checkpoint-2373",
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.938301282051282,
14
+ "eval_loss": 0.19862917065620422,
15
+ "eval_runtime": 5.4522,
16
+ "eval_samples_per_second": 457.799,
17
+ "eval_steps_per_second": 1.834,
18
+ "step": 791
19
+ },
20
+ {
21
+ "epoch": 1.26,
22
+ "grad_norm": 1.910953402519226,
23
+ "learning_rate": 4.367888748419722e-05,
24
+ "loss": 0.1723,
25
+ "step": 1000
26
+ },
27
+ {
28
+ "epoch": 2.0,
29
+ "eval_accuracy": 0.9455128205128205,
30
+ "eval_loss": 0.2700441777706146,
31
+ "eval_runtime": 5.0135,
32
+ "eval_samples_per_second": 497.859,
33
+ "eval_steps_per_second": 1.995,
34
+ "step": 1582
35
+ },
36
+ {
37
+ "epoch": 2.53,
38
+ "grad_norm": 19.194658279418945,
39
+ "learning_rate": 3.735777496839444e-05,
40
+ "loss": 0.0772,
41
+ "step": 2000
42
+ },
43
+ {
44
+ "epoch": 3.0,
45
+ "eval_accuracy": 0.9551282051282052,
46
+ "eval_loss": 0.20845328271389008,
47
+ "eval_runtime": 4.8197,
48
+ "eval_samples_per_second": 517.874,
49
+ "eval_steps_per_second": 2.075,
50
+ "step": 2373
51
+ },
52
+ {
53
+ "epoch": 3.79,
54
+ "grad_norm": 0.3629066050052643,
55
+ "learning_rate": 3.1036662452591655e-05,
56
+ "loss": 0.0516,
57
+ "step": 3000
58
+ },
59
+ {
60
+ "epoch": 4.0,
61
+ "eval_accuracy": 0.9427083333333334,
62
+ "eval_loss": 0.2969796061515808,
63
+ "eval_runtime": 4.7872,
64
+ "eval_samples_per_second": 521.395,
65
+ "eval_steps_per_second": 2.089,
66
+ "step": 3164
67
+ },
68
+ {
69
+ "epoch": 5.0,
70
+ "eval_accuracy": 0.953926282051282,
71
+ "eval_loss": 0.2620067596435547,
72
+ "eval_runtime": 4.7806,
73
+ "eval_samples_per_second": 522.107,
74
+ "eval_steps_per_second": 2.092,
75
+ "step": 3955
76
+ },
77
+ {
78
+ "epoch": 5.06,
79
+ "grad_norm": 0.0031597923953086138,
80
+ "learning_rate": 2.4715549936788876e-05,
81
+ "loss": 0.0341,
82
+ "step": 4000
83
+ },
84
+ {
85
+ "epoch": 6.0,
86
+ "eval_accuracy": 0.9423076923076923,
87
+ "eval_loss": 0.39730244874954224,
88
+ "eval_runtime": 4.7836,
89
+ "eval_samples_per_second": 521.783,
90
+ "eval_steps_per_second": 2.09,
91
+ "step": 4746
92
+ },
93
+ {
94
+ "epoch": 6.32,
95
+ "grad_norm": 0.006749527528882027,
96
+ "learning_rate": 1.8394437420986094e-05,
97
+ "loss": 0.0203,
98
+ "step": 5000
99
+ },
100
+ {
101
+ "epoch": 7.0,
102
+ "eval_accuracy": 0.9423076923076923,
103
+ "eval_loss": 0.3636617958545685,
104
+ "eval_runtime": 4.7835,
105
+ "eval_samples_per_second": 521.797,
106
+ "eval_steps_per_second": 2.091,
107
+ "step": 5537
108
+ },
109
+ {
110
+ "epoch": 7.59,
111
+ "grad_norm": 0.012521493248641491,
112
+ "learning_rate": 1.2073324905183313e-05,
113
+ "loss": 0.0146,
114
+ "step": 6000
115
+ },
116
+ {
117
+ "epoch": 8.0,
118
+ "eval_accuracy": 0.9451121794871795,
119
+ "eval_loss": 0.4154008626937866,
120
+ "eval_runtime": 4.7634,
121
+ "eval_samples_per_second": 523.998,
122
+ "eval_steps_per_second": 2.099,
123
+ "step": 6328
124
+ },
125
+ {
126
+ "epoch": 8.85,
127
+ "grad_norm": 0.005341885611414909,
128
+ "learning_rate": 5.752212389380531e-06,
129
+ "loss": 0.007,
130
+ "step": 7000
131
+ },
132
+ {
133
+ "epoch": 9.0,
134
+ "eval_accuracy": 0.9463141025641025,
135
+ "eval_loss": 0.4218637943267822,
136
+ "eval_runtime": 4.8145,
137
+ "eval_samples_per_second": 518.431,
138
+ "eval_steps_per_second": 2.077,
139
+ "step": 7119
140
+ },
141
+ {
142
+ "epoch": 10.0,
143
+ "eval_accuracy": 0.9447115384615384,
144
+ "eval_loss": 0.4098478853702545,
145
+ "eval_runtime": 4.8332,
146
+ "eval_samples_per_second": 516.428,
147
+ "eval_steps_per_second": 2.069,
148
+ "step": 7910
149
+ },
150
+ {
151
+ "epoch": 10.0,
152
+ "step": 7910,
153
+ "total_flos": 1.663959132942336e+16,
154
+ "train_loss": 0.048086456131241864,
155
+ "train_runtime": 1425.5671,
156
+ "train_samples_per_second": 177.445,
157
+ "train_steps_per_second": 5.549
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:4de6cbc7180e01d7bbaac6d209405970b8c1932b419ce007ab9190aeb3348435
3
+ size 5048
vocab.txt ADDED
The diff for this file is too large to render. See raw diff