quanxuantruong commited on
Commit
ff9a1e9
·
verified ·
1 Parent(s): 4253d1b

Model save

Browse files
README.md ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ base_model: google-bert/bert-base-uncased
5
+ tags:
6
+ - generated_from_trainer
7
+ metrics:
8
+ - accuracy
9
+ - precision
10
+ - recall
11
+ - f1
12
+ model-index:
13
+ - name: bert-base-finetuned-ner-covidmed-v3
14
+ results: []
15
+ ---
16
+
17
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
18
+ should probably proofread and complete it, then remove this comment. -->
19
+
20
+ # bert-base-finetuned-ner-covidmed-v3
21
+
22
+ This model is a fine-tuned version of [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) on an unknown dataset.
23
+ It achieves the following results on the evaluation set:
24
+ - Loss: 0.1759
25
+ - Accuracy: 0.9552
26
+ - Precision: 0.8111
27
+ - Recall: 0.8378
28
+ - F1: 0.8238
29
+ - Age Precision: 0.9002
30
+ - Age Recall: 0.9759
31
+ - Age F1-score: 0.9365
32
+ - Date Precision: 0.9651
33
+ - Date Recall: 0.9867
34
+ - Date F1-score: 0.9758
35
+ - Gender Precision: 0.9165
36
+ - Gender Recall: 0.9502
37
+ - Gender F1-score: 0.9330
38
+ - Job Precision: 0.4444
39
+ - Job Recall: 0.4162
40
+ - Job F1-score: 0.4299
41
+ - Location Precision: 0.8167
42
+ - Location Recall: 0.8791
43
+ - Location F1-score: 0.8468
44
+ - Name Precision: 0.8328
45
+ - Name Recall: 0.7987
46
+ - Name F1-score: 0.8154
47
+ - Organization Precision: 0.6818
48
+ - Organization Recall: 0.7393
49
+ - Organization F1-score: 0.7094
50
+ - Patient Id Precision: 0.96
51
+ - Patient Id Recall: 0.9815
52
+ - Patient Id F1-score: 0.9707
53
+ - Symptom And Disease Precision: 0.6834
54
+ - Symptom And Disease Recall: 0.7544
55
+ - Symptom And Disease F1-score: 0.7172
56
+ - Transportation Precision: 0.9105
57
+ - Transportation Recall: 0.8964
58
+ - Transportation F1-score: 0.9034
59
+ - Micro avg Precision: 0.8432
60
+ - Micro avg Recall: 0.8894
61
+ - Micro avg F1-score: 0.8657
62
+ - Macro avg Precision: 0.8111
63
+ - Macro avg Recall: 0.8378
64
+ - Macro avg F1-score: 0.8238
65
+ - Weighted avg Precision: 0.8449
66
+ - Weighted avg Recall: 0.8894
67
+ - Weighted avg F1-score: 0.8663
68
+
69
+ ## Model description
70
+
71
+ More information needed
72
+
73
+ ## Intended uses & limitations
74
+
75
+ More information needed
76
+
77
+ ## Training and evaluation data
78
+
79
+ More information needed
80
+
81
+ ## Training procedure
82
+
83
+ ### Training hyperparameters
84
+
85
+ The following hyperparameters were used during training:
86
+ - learning_rate: 2e-05
87
+ - train_batch_size: 64
88
+ - eval_batch_size: 64
89
+ - seed: 42
90
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
91
+ - lr_scheduler_type: linear
92
+ - num_epochs: 10
93
+
94
+ ### Training results
95
+
96
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 | Age Precision | Age Recall | Age F1-score | Date Precision | Date Recall | Date F1-score | Gender Precision | Gender Recall | Gender F1-score | Job Precision | Job Recall | Job F1-score | Location Precision | Location Recall | Location F1-score | Name Precision | Name Recall | Name F1-score | Organization Precision | Organization Recall | Organization F1-score | Patient Id Precision | Patient Id Recall | Patient Id F1-score | Symptom And Disease Precision | Symptom And Disease Recall | Symptom And Disease F1-score | Transportation Precision | Transportation Recall | Transportation F1-score | Micro avg Precision | Micro avg Recall | Micro avg F1-score | Macro avg Precision | Macro avg Recall | Macro avg F1-score | Weighted avg Precision | Weighted avg Recall | Weighted avg F1-score |
97
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:---------:|:------:|:------:|:-------------:|:----------:|:------------:|:--------------:|:-----------:|:-------------:|:----------------:|:-------------:|:---------------:|:-------------:|:----------:|:------------:|:------------------:|:---------------:|:-----------------:|:--------------:|:-----------:|:-------------:|:----------------------:|:-------------------:|:---------------------:|:--------------------:|:-----------------:|:-------------------:|:-----------------------------:|:--------------------------:|:----------------------------:|:------------------------:|:---------------------:|:-----------------------:|:-------------------:|:----------------:|:------------------:|:-------------------:|:----------------:|:------------------:|:----------------------:|:-------------------:|:---------------------:|
98
+ | No log | 1.0 | 79 | 0.4545 | 0.8761 | 0.5390 | 0.4408 | 0.4548 | 0.9162 | 0.8076 | 0.8584 | 0.9329 | 0.9674 | 0.9498 | 0.9947 | 0.4026 | 0.5732 | 0.0 | 0.0 | 0.0 | 0.4892 | 0.6845 | 0.5706 | 0.0 | 0.0 | 0.0 | 0.1727 | 0.1855 | 0.1789 | 0.7334 | 0.9716 | 0.8359 | 0.2827 | 0.0836 | 0.1291 | 0.8676 | 0.3057 | 0.4521 | 0.6025 | 0.6426 | 0.6219 | 0.5390 | 0.4408 | 0.4548 | 0.5795 | 0.6426 | 0.5895 |
99
+ | No log | 2.0 | 158 | 0.2802 | 0.9247 | 0.6951 | 0.6739 | 0.6795 | 0.8503 | 0.9467 | 0.8959 | 0.9489 | 0.9764 | 0.9625 | 0.9442 | 0.8788 | 0.9103 | 0.0 | 0.0 | 0.0 | 0.6492 | 0.7951 | 0.7148 | 0.9211 | 0.6604 | 0.7692 | 0.4086 | 0.3943 | 0.4013 | 0.8775 | 0.9751 | 0.9237 | 0.5778 | 0.5264 | 0.5509 | 0.7740 | 0.5855 | 0.6667 | 0.7367 | 0.7911 | 0.7629 | 0.6951 | 0.6739 | 0.6795 | 0.7292 | 0.7911 | 0.7558 |
100
+ | No log | 3.0 | 237 | 0.2240 | 0.9387 | 0.7115 | 0.7248 | 0.7169 | 0.8728 | 0.9553 | 0.9122 | 0.9583 | 0.9861 | 0.9720 | 0.9226 | 0.9026 | 0.9125 | 0.0 | 0.0 | 0.0 | 0.7230 | 0.8253 | 0.7708 | 0.8791 | 0.7547 | 0.8122 | 0.5168 | 0.5175 | 0.5172 | 0.9230 | 0.9741 | 0.9478 | 0.5992 | 0.6540 | 0.6254 | 0.7198 | 0.6788 | 0.6987 | 0.7821 | 0.8296 | 0.8051 | 0.7115 | 0.7248 | 0.7169 | 0.7736 | 0.8296 | 0.7998 |
101
+ | No log | 4.0 | 316 | 0.2049 | 0.9414 | 0.7569 | 0.7707 | 0.7521 | 0.8650 | 0.9691 | 0.9141 | 0.9702 | 0.9849 | 0.9775 | 0.9281 | 0.9221 | 0.9251 | 0.44 | 0.1272 | 0.1973 | 0.7257 | 0.8543 | 0.7848 | 0.8507 | 0.7704 | 0.8086 | 0.5489 | 0.5901 | 0.5687 | 0.9469 | 0.9776 | 0.9620 | 0.5176 | 0.7394 | 0.6089 | 0.7760 | 0.7720 | 0.7740 | 0.7715 | 0.8593 | 0.8131 | 0.7569 | 0.7707 | 0.7521 | 0.7811 | 0.8593 | 0.8147 |
102
+ | No log | 5.0 | 395 | 0.1930 | 0.9460 | 0.7398 | 0.8172 | 0.7750 | 0.8228 | 0.9811 | 0.8950 | 0.9589 | 0.9873 | 0.9729 | 0.8519 | 0.9589 | 0.9022 | 0.2796 | 0.3006 | 0.2897 | 0.7646 | 0.8593 | 0.8092 | 0.7885 | 0.7736 | 0.7810 | 0.5462 | 0.7211 | 0.6216 | 0.9381 | 0.9820 | 0.9596 | 0.5961 | 0.7482 | 0.6635 | 0.8513 | 0.8601 | 0.8557 | 0.7838 | 0.8779 | 0.8282 | 0.7398 | 0.8172 | 0.7750 | 0.7922 | 0.8779 | 0.8318 |
103
+ | No log | 6.0 | 474 | 0.1787 | 0.9526 | 0.7912 | 0.8224 | 0.8048 | 0.8698 | 0.9759 | 0.9198 | 0.9640 | 0.9879 | 0.9758 | 0.9062 | 0.9416 | 0.9236 | 0.4351 | 0.3295 | 0.3750 | 0.8163 | 0.8606 | 0.8379 | 0.8092 | 0.7736 | 0.7910 | 0.6345 | 0.7497 | 0.6873 | 0.9512 | 0.9810 | 0.9659 | 0.6445 | 0.7438 | 0.6906 | 0.8808 | 0.8808 | 0.8808 | 0.8305 | 0.8796 | 0.8544 | 0.7912 | 0.8224 | 0.8048 | 0.8330 | 0.8796 | 0.8551 |
104
+ | 0.249 | 7.0 | 553 | 0.1752 | 0.9538 | 0.8068 | 0.8268 | 0.8158 | 0.9217 | 0.9708 | 0.9456 | 0.9668 | 0.9873 | 0.9770 | 0.9236 | 0.9416 | 0.9325 | 0.4362 | 0.3757 | 0.4037 | 0.8018 | 0.8710 | 0.8350 | 0.8339 | 0.7893 | 0.8110 | 0.6623 | 0.7173 | 0.6887 | 0.9572 | 0.9805 | 0.9687 | 0.6605 | 0.7535 | 0.7039 | 0.9043 | 0.8808 | 0.8924 | 0.8343 | 0.8830 | 0.8580 | 0.8068 | 0.8268 | 0.8158 | 0.8367 | 0.8830 | 0.8588 |
105
+ | 0.249 | 8.0 | 632 | 0.1741 | 0.9546 | 0.8080 | 0.8319 | 0.8190 | 0.8891 | 0.9777 | 0.9313 | 0.9663 | 0.9873 | 0.9767 | 0.9197 | 0.9416 | 0.9305 | 0.4351 | 0.3873 | 0.4098 | 0.8158 | 0.8674 | 0.8408 | 0.8523 | 0.7987 | 0.8247 | 0.6421 | 0.7471 | 0.6906 | 0.96 | 0.9815 | 0.9707 | 0.6948 | 0.7394 | 0.7164 | 0.9053 | 0.8912 | 0.8982 | 0.8412 | 0.8833 | 0.8618 | 0.8080 | 0.8319 | 0.8190 | 0.8431 | 0.8833 | 0.8624 |
106
+ | 0.249 | 9.0 | 711 | 0.1783 | 0.9556 | 0.8154 | 0.8331 | 0.8236 | 0.9171 | 0.9691 | 0.9424 | 0.9668 | 0.9873 | 0.9770 | 0.9333 | 0.9394 | 0.9364 | 0.4444 | 0.3931 | 0.4172 | 0.8240 | 0.8762 | 0.8493 | 0.8333 | 0.8019 | 0.8173 | 0.6907 | 0.7328 | 0.7111 | 0.9610 | 0.9820 | 0.9714 | 0.6785 | 0.7579 | 0.7160 | 0.9053 | 0.8912 | 0.8982 | 0.8482 | 0.8873 | 0.8673 | 0.8154 | 0.8331 | 0.8236 | 0.8496 | 0.8873 | 0.8678 |
107
+ | 0.249 | 10.0 | 790 | 0.1759 | 0.9552 | 0.8111 | 0.8378 | 0.8238 | 0.9002 | 0.9759 | 0.9365 | 0.9651 | 0.9867 | 0.9758 | 0.9165 | 0.9502 | 0.9330 | 0.4444 | 0.4162 | 0.4299 | 0.8167 | 0.8791 | 0.8468 | 0.8328 | 0.7987 | 0.8154 | 0.6818 | 0.7393 | 0.7094 | 0.96 | 0.9815 | 0.9707 | 0.6834 | 0.7544 | 0.7172 | 0.9105 | 0.8964 | 0.9034 | 0.8432 | 0.8894 | 0.8657 | 0.8111 | 0.8378 | 0.8238 | 0.8449 | 0.8894 | 0.8663 |
108
+
109
+
110
+ ### Framework versions
111
+
112
+ - Transformers 4.51.3
113
+ - Pytorch 2.6.0+cu124
114
+ - Datasets 3.6.0
115
+ - Tokenizers 0.21.1
config.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForTokenClassification"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "gradient_checkpointing": false,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "B-AGE",
13
+ "1": "B-DATE",
14
+ "2": "B-GENDER",
15
+ "3": "B-JOB",
16
+ "4": "B-LOCATION",
17
+ "5": "B-NAME",
18
+ "6": "B-ORGANIZATION",
19
+ "7": "B-PATIENT_ID",
20
+ "8": "B-SYMPTOM_AND_DISEASE",
21
+ "9": "B-TRANSPORTATION",
22
+ "10": "I-AGE",
23
+ "11": "I-DATE",
24
+ "12": "I-GENDER",
25
+ "13": "I-JOB",
26
+ "14": "I-LOCATION",
27
+ "15": "I-NAME",
28
+ "16": "I-ORGANIZATION",
29
+ "17": "I-PATIENT_ID",
30
+ "18": "I-SYMPTOM_AND_DISEASE",
31
+ "19": "I-TRANSPORTATION",
32
+ "20": "O"
33
+ },
34
+ "initializer_range": 0.02,
35
+ "intermediate_size": 3072,
36
+ "label2id": {
37
+ "B-AGE": 0,
38
+ "B-DATE": 1,
39
+ "B-GENDER": 2,
40
+ "B-JOB": 3,
41
+ "B-LOCATION": 4,
42
+ "B-NAME": 5,
43
+ "B-ORGANIZATION": 6,
44
+ "B-PATIENT_ID": 7,
45
+ "B-SYMPTOM_AND_DISEASE": 8,
46
+ "B-TRANSPORTATION": 9,
47
+ "I-AGE": 10,
48
+ "I-DATE": 11,
49
+ "I-GENDER": 12,
50
+ "I-JOB": 13,
51
+ "I-LOCATION": 14,
52
+ "I-NAME": 15,
53
+ "I-ORGANIZATION": 16,
54
+ "I-PATIENT_ID": 17,
55
+ "I-SYMPTOM_AND_DISEASE": 18,
56
+ "I-TRANSPORTATION": 19,
57
+ "O": 20
58
+ },
59
+ "layer_norm_eps": 1e-12,
60
+ "max_position_embeddings": 512,
61
+ "model_type": "bert",
62
+ "num_attention_heads": 12,
63
+ "num_hidden_layers": 12,
64
+ "pad_token_id": 0,
65
+ "position_embedding_type": "absolute",
66
+ "torch_dtype": "float32",
67
+ "transformers_version": "4.51.3",
68
+ "type_vocab_size": 2,
69
+ "use_cache": true,
70
+ "vocab_size": 30522
71
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b3d9c840b17092b9a4f8a2dca48edf1e0e927937fb213f4c6312c0c7f6e3a32
3
+ size 435654532
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,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
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": false,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "BertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e5d8e3260dffa0ded9c8a79dfda11e368ad40ba0e57b00ed66713b5fa5bd4f5
3
+ size 5368
vocab.txt ADDED
The diff for this file is too large to render. See raw diff