Model save
Browse files- README.md +112 -0
- config.json +71 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +56 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-v2
|
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-v2
|
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.2063
|
25 |
+
- Accuracy: 0.9462
|
26 |
+
- Precision: 0.7743
|
27 |
+
- Recall: 0.7764
|
28 |
+
- F1: 0.7662
|
29 |
+
- Age Precision: 0.8797
|
30 |
+
- Age Recall: 0.9553
|
31 |
+
- Age F1-score: 0.9160
|
32 |
+
- Date Precision: 0.9645
|
33 |
+
- Date Recall: 0.9867
|
34 |
+
- Date F1-score: 0.9755
|
35 |
+
- Gender Precision: 0.9151
|
36 |
+
- Gender Recall: 0.9329
|
37 |
+
- Gender F1-score: 0.9239
|
38 |
+
- Job Precision: 0.4643
|
39 |
+
- Job Recall: 0.1503
|
40 |
+
- Job F1-score: 0.2271
|
41 |
+
- Location Precision: 0.7505
|
42 |
+
- Location Recall: 0.8372
|
43 |
+
- Location F1-score: 0.7915
|
44 |
+
- Name Precision: 0.8225
|
45 |
+
- Name Recall: 0.7579
|
46 |
+
- Name F1-score: 0.7889
|
47 |
+
- Organization Precision: 0.5831
|
48 |
+
- Organization Recall: 0.6822
|
49 |
+
- Organization F1-score: 0.6288
|
50 |
+
- Patient Id Precision: 0.9330
|
51 |
+
- Patient Id Recall: 0.9800
|
52 |
+
- Patient Id F1-score: 0.9560
|
53 |
+
- Symptom And Disease Precision: 0.6264
|
54 |
+
- Symptom And Disease Recall: 0.6937
|
55 |
+
- Symptom And Disease F1-score: 0.6583
|
56 |
+
- Transportation Precision: 0.8042
|
57 |
+
- Transportation Recall: 0.7876
|
58 |
+
- Transportation F1-score: 0.7958
|
59 |
+
- Micro avg Precision: 0.7994
|
60 |
+
- Micro avg Recall: 0.8551
|
61 |
+
- Micro avg F1-score: 0.8263
|
62 |
+
- Macro avg Precision: 0.7743
|
63 |
+
- Macro avg Recall: 0.7764
|
64 |
+
- Macro avg F1-score: 0.7662
|
65 |
+
- Weighted avg Precision: 0.8004
|
66 |
+
- Weighted avg Recall: 0.8551
|
67 |
+
- Weighted avg F1-score: 0.8250
|
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: 7
|
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.5109 | 0.8608 | 0.6258 | 0.4426 | 0.4738 | 0.9455 | 0.8643 | 0.9031 | 0.9407 | 0.9692 | 0.9547 | 1.0 | 0.4026 | 0.5741 | 0.0 | 0.0 | 0.0 | 0.4126 | 0.6039 | 0.4903 | 0.9479 | 0.2862 | 0.4396 | 0.0620 | 0.0506 | 0.0557 | 0.7840 | 0.9666 | 0.8658 | 0.2288 | 0.0546 | 0.0881 | 0.9362 | 0.2280 | 0.3667 | 0.5747 | 0.6091 | 0.5914 | 0.6258 | 0.4426 | 0.4738 | 0.5763 | 0.6091 | 0.5655 |
|
99 |
+
| No log | 2.0 | 158 | 0.3149 | 0.9142 | 0.6666 | 0.6617 | 0.6599 | 0.8715 | 0.9210 | 0.8956 | 0.9433 | 0.9752 | 0.9590 | 0.9499 | 0.8615 | 0.9035 | 0.0 | 0.0 | 0.0 | 0.6003 | 0.7613 | 0.6713 | 0.8434 | 0.7453 | 0.7913 | 0.3226 | 0.3774 | 0.3479 | 0.8531 | 0.9791 | 0.9118 | 0.4833 | 0.4208 | 0.4499 | 0.7986 | 0.5751 | 0.6687 | 0.6936 | 0.7676 | 0.7287 | 0.6666 | 0.6617 | 0.6599 | 0.6905 | 0.7676 | 0.7238 |
|
100 |
+
| No log | 3.0 | 237 | 0.2443 | 0.9324 | 0.7024 | 0.7168 | 0.7082 | 0.8834 | 0.9244 | 0.9034 | 0.9594 | 0.9867 | 0.9729 | 0.9368 | 0.8983 | 0.9171 | 0.0 | 0.0 | 0.0 | 0.6713 | 0.8095 | 0.7340 | 0.8293 | 0.7484 | 0.7868 | 0.4736 | 0.5110 | 0.4916 | 0.9115 | 0.9761 | 0.9427 | 0.5902 | 0.625 | 0.6071 | 0.7688 | 0.6891 | 0.7268 | 0.7539 | 0.8191 | 0.7851 | 0.7024 | 0.7168 | 0.7082 | 0.7491 | 0.8191 | 0.7812 |
|
101 |
+
| No log | 4.0 | 316 | 0.2329 | 0.9347 | 0.6945 | 0.7329 | 0.7118 | 0.8716 | 0.9450 | 0.9068 | 0.9640 | 0.9867 | 0.9752 | 0.9194 | 0.9134 | 0.9164 | 0.0 | 0.0 | 0.0 | 0.6822 | 0.8325 | 0.7499 | 0.8253 | 0.7579 | 0.7902 | 0.5069 | 0.5227 | 0.5147 | 0.9277 | 0.9786 | 0.9524 | 0.5454 | 0.6822 | 0.6062 | 0.7026 | 0.7098 | 0.7062 | 0.7541 | 0.8367 | 0.7933 | 0.6945 | 0.7329 | 0.7118 | 0.7520 | 0.8367 | 0.7905 |
|
102 |
+
| No log | 5.0 | 395 | 0.2173 | 0.9419 | 0.7434 | 0.7682 | 0.7441 | 0.8366 | 0.9674 | 0.8972 | 0.9634 | 0.9867 | 0.9749 | 0.8912 | 0.9394 | 0.9146 | 0.4186 | 0.1040 | 0.1667 | 0.7247 | 0.8298 | 0.7737 | 0.8114 | 0.7579 | 0.7837 | 0.5401 | 0.6719 | 0.5988 | 0.9129 | 0.9830 | 0.9467 | 0.5894 | 0.6963 | 0.6384 | 0.7461 | 0.7461 | 0.7461 | 0.7730 | 0.8519 | 0.8106 | 0.7434 | 0.7682 | 0.7441 | 0.7756 | 0.8519 | 0.8096 |
|
103 |
+
| No log | 6.0 | 474 | 0.2085 | 0.9443 | 0.7635 | 0.7745 | 0.7595 | 0.8719 | 0.9588 | 0.9133 | 0.9640 | 0.9867 | 0.9752 | 0.9153 | 0.9351 | 0.9251 | 0.4340 | 0.1329 | 0.2035 | 0.7369 | 0.8356 | 0.7832 | 0.8225 | 0.7579 | 0.7889 | 0.5739 | 0.6900 | 0.6266 | 0.9282 | 0.9800 | 0.9534 | 0.6085 | 0.6963 | 0.6494 | 0.7801 | 0.7720 | 0.7760 | 0.7887 | 0.8550 | 0.8205 | 0.7635 | 0.7745 | 0.7595 | 0.7907 | 0.8550 | 0.8196 |
|
104 |
+
| 0.2745 | 7.0 | 553 | 0.2063 | 0.9462 | 0.7743 | 0.7764 | 0.7662 | 0.8797 | 0.9553 | 0.9160 | 0.9645 | 0.9867 | 0.9755 | 0.9151 | 0.9329 | 0.9239 | 0.4643 | 0.1503 | 0.2271 | 0.7505 | 0.8372 | 0.7915 | 0.8225 | 0.7579 | 0.7889 | 0.5831 | 0.6822 | 0.6288 | 0.9330 | 0.9800 | 0.9560 | 0.6264 | 0.6937 | 0.6583 | 0.8042 | 0.7876 | 0.7958 | 0.7994 | 0.8551 | 0.8263 | 0.7743 | 0.7764 | 0.7662 | 0.8004 | 0.8551 | 0.8250 |
|
105 |
+
|
106 |
+
|
107 |
+
### Framework versions
|
108 |
+
|
109 |
+
- Transformers 4.51.3
|
110 |
+
- Pytorch 2.6.0+cu124
|
111 |
+
- Datasets 3.6.0
|
112 |
+
- 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:e7af41ac562971c5dc7fda7d976ce46a8015097a86c99936912a1099cd5c2e19
|
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:3765007113bca17134b853d397b00c0ff54d7ccd8c37ec11523ae41ae5dc4840
|
3 |
+
size 5368
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|