KpRT commited on
Commit
11a4aa8
·
verified ·
1 Parent(s): a03ed31
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: bert-base-uncased
4
+ tags:
5
+ - generated_from_trainer
6
+ metrics:
7
+ - f1
8
+ model-index:
9
+ - name: task-t1
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
+ # task-t1
17
+
18
+ This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the None dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.4146
21
+ - F1: 0.7293
22
+ - Chronic Disease F1: 0.7306
23
+ - Chronic Disease Num: 2537
24
+ - Cancer F1: 0.7151
25
+ - Cancer Num: 880
26
+ - Allergy F1: 0.6551
27
+ - Allergy Num: 219
28
+ - Treatment F1: 0.7365
29
+ - Treatment Num: 3197
30
+ - Other F1: 0
31
+ - Other Num: 0
32
+
33
+ ## Model description
34
+
35
+ More information needed
36
+
37
+ ## Intended uses & limitations
38
+
39
+ More information needed
40
+
41
+ ## Training and evaluation data
42
+
43
+ More information needed
44
+
45
+ ## Training procedure
46
+
47
+ ### Training hyperparameters
48
+
49
+ The following hyperparameters were used during training:
50
+ - learning_rate: 2e-05
51
+ - train_batch_size: 16
52
+ - eval_batch_size: 16
53
+ - seed: 42
54
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
55
+ - lr_scheduler_type: linear
56
+ - num_epochs: 2
57
+
58
+ ### Training results
59
+
60
+ | Training Loss | Epoch | Step | Validation Loss | F1 | Chronic Disease F1 | Chronic Disease Num | Cancer F1 | Cancer Num | Allergy F1 | Allergy Num | Treatment F1 | Treatment Num | Other F1 | Other Num |
61
+ |:-------------:|:------:|:----:|:---------------:|:------:|:------------------:|:-------------------:|:---------:|:----------:|:----------:|:-----------:|:------------:|:-------------:|:--------:|:---------:|
62
+ | 1.0109 | 0.2717 | 100 | 0.6744 | 0.4452 | 0.4017 | 2537 | 0.0448 | 880 | 0.0 | 219 | 0.5504 | 3197 | 0 | 0 |
63
+ | 0.5833 | 0.5435 | 200 | 0.4954 | 0.6268 | 0.6392 | 2537 | 0.5937 | 880 | 0.0 | 219 | 0.6459 | 3197 | 0 | 0 |
64
+ | 0.4668 | 0.8152 | 300 | 0.4519 | 0.6782 | 0.6951 | 2537 | 0.6396 | 880 | 0.0359 | 219 | 0.6962 | 3197 | 0 | 0 |
65
+ | 0.4275 | 1.0870 | 400 | 0.4314 | 0.7046 | 0.7102 | 2537 | 0.6883 | 880 | 0.5127 | 219 | 0.7138 | 3197 | 0 | 0 |
66
+ | 0.3483 | 1.3587 | 500 | 0.4282 | 0.7181 | 0.7212 | 2537 | 0.7078 | 880 | 0.6469 | 219 | 0.7226 | 3197 | 0 | 0 |
67
+ | 0.3334 | 1.6304 | 600 | 0.4126 | 0.7293 | 0.7313 | 2537 | 0.7170 | 880 | 0.6683 | 219 | 0.7349 | 3197 | 0 | 0 |
68
+ | 0.3249 | 1.9022 | 700 | 0.4146 | 0.7293 | 0.7306 | 2537 | 0.7151 | 880 | 0.6551 | 219 | 0.7365 | 3197 | 0 | 0 |
69
+
70
+
71
+ ### Framework versions
72
+
73
+ - Transformers 4.42.4
74
+ - Pytorch 2.3.1+cu121
75
+ - Datasets 2.20.0
76
+ - Tokenizers 0.19.1
config.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bert-base-uncased",
3
+ "architectures": [
4
+ "BertForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "O",
14
+ "1": "B-treatment",
15
+ "2": "I-treatment",
16
+ "3": "B-chronic_disease",
17
+ "4": "I-chronic_disease",
18
+ "5": "B-cancer",
19
+ "6": "I-cancer",
20
+ "7": "B-allergy",
21
+ "8": "I-allergy",
22
+ "9": "B-other",
23
+ "10": "I-other"
24
+ },
25
+ "initializer_range": 0.02,
26
+ "intermediate_size": 3072,
27
+ "label2id": {
28
+ "B-allergy_name": 7,
29
+ "B-cancer": 5,
30
+ "B-chronic_disease": 3,
31
+ "B-other": 9,
32
+ "B-treatment": 1,
33
+ "I-allergy_name": 8,
34
+ "I-cancer": 6,
35
+ "I-chronic_disease": 4,
36
+ "I-other": 10,
37
+ "I-treatment": 2,
38
+ "O": 0
39
+ },
40
+ "layer_norm_eps": 1e-12,
41
+ "max_position_embeddings": 512,
42
+ "model_type": "bert",
43
+ "num_attention_heads": 12,
44
+ "num_hidden_layers": 12,
45
+ "pad_token_id": 0,
46
+ "position_embedding_type": "absolute",
47
+ "torch_dtype": "float32",
48
+ "transformers_version": "4.42.4",
49
+ "type_vocab_size": 2,
50
+ "use_cache": true,
51
+ "vocab_size": 30522
52
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8aecb6bb1a911f45c37ae4486d9faf028521471b35e2d578ac41cdb2d6b4f32
3
+ size 435623772
runs/Jul21_06-31-49_5891dff67884/events.out.tfevents.1721543515.5891dff67884.2327.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68a806c460b88ab5cbf4fff29a78ab90243df8f15aa1fd317cb3a0ef79c7bd7a
3
+ size 13268
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,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "mask_token": "[MASK]",
48
+ "model_max_length": 512,
49
+ "pad_token": "[PAD]",
50
+ "sep_token": "[SEP]",
51
+ "strip_accents": null,
52
+ "tokenize_chinese_chars": true,
53
+ "tokenizer_class": "BertTokenizer",
54
+ "unk_token": "[UNK]"
55
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:976cd7bfc6394568a3062d7133e01b6a540ff647dbca23911c1a14ec14858ee9
3
+ size 5112
vocab.txt ADDED
The diff for this file is too large to render. See raw diff