msperka/bert-finetuned-ner
Browse files- .gitattributes +1 -0
- README.md +92 -0
- config.json +105 -0
- model.safetensors +3 -0
- runs/Dec11_13-50-37_soc-5CG223442L/events.out.tfevents.1702295442.soc-5CG223442L +3 -0
- runs/Dec11_13-53-45_soc-5CG223442L/events.out.tfevents.1702295627.soc-5CG223442L +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +63 -0
- training_args.bin +3 -0
- vocab.txt +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
vocab.txt filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-4.0
|
3 |
+
base_model: dicta-il/dictabert
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- nemo_corpus
|
8 |
+
metrics:
|
9 |
+
- precision
|
10 |
+
- recall
|
11 |
+
- f1
|
12 |
+
- accuracy
|
13 |
+
model-index:
|
14 |
+
- name: bert-finetuned-ner
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
name: Token Classification
|
18 |
+
type: token-classification
|
19 |
+
dataset:
|
20 |
+
name: nemo_corpus
|
21 |
+
type: nemo_corpus
|
22 |
+
config: flat_token
|
23 |
+
split: validation
|
24 |
+
args: flat_token
|
25 |
+
metrics:
|
26 |
+
- name: Precision
|
27 |
+
type: precision
|
28 |
+
value: 0.8606811145510835
|
29 |
+
- name: Recall
|
30 |
+
type: recall
|
31 |
+
value: 0.852760736196319
|
32 |
+
- name: F1
|
33 |
+
type: f1
|
34 |
+
value: 0.8567026194144837
|
35 |
+
- name: Accuracy
|
36 |
+
type: accuracy
|
37 |
+
value: 0.9786301369863014
|
38 |
+
---
|
39 |
+
|
40 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
41 |
+
should probably proofread and complete it, then remove this comment. -->
|
42 |
+
|
43 |
+
# bert-finetuned-ner
|
44 |
+
|
45 |
+
This model is a fine-tuned version of [dicta-il/dictabert](https://huggingface.co/dicta-il/dictabert) on the nemo_corpus dataset.
|
46 |
+
It achieves the following results on the evaluation set:
|
47 |
+
- Loss: 0.1102
|
48 |
+
- Precision: 0.8607
|
49 |
+
- Recall: 0.8528
|
50 |
+
- F1: 0.8567
|
51 |
+
- Accuracy: 0.9786
|
52 |
+
|
53 |
+
## Model description
|
54 |
+
|
55 |
+
More information needed
|
56 |
+
|
57 |
+
## Intended uses & limitations
|
58 |
+
|
59 |
+
More information needed
|
60 |
+
|
61 |
+
## Training and evaluation data
|
62 |
+
|
63 |
+
More information needed
|
64 |
+
|
65 |
+
## Training procedure
|
66 |
+
|
67 |
+
### Training hyperparameters
|
68 |
+
|
69 |
+
The following hyperparameters were used during training:
|
70 |
+
- learning_rate: 2e-05
|
71 |
+
- train_batch_size: 8
|
72 |
+
- eval_batch_size: 8
|
73 |
+
- seed: 42
|
74 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
75 |
+
- lr_scheduler_type: linear
|
76 |
+
- num_epochs: 3
|
77 |
+
|
78 |
+
### Training results
|
79 |
+
|
80 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
81 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
82 |
+
| 0.2884 | 1.0 | 618 | 0.1202 | 0.8182 | 0.8006 | 0.8093 | 0.9733 |
|
83 |
+
| 0.0896 | 2.0 | 1236 | 0.1081 | 0.8298 | 0.8374 | 0.8336 | 0.9771 |
|
84 |
+
| 0.0548 | 3.0 | 1854 | 0.1102 | 0.8607 | 0.8528 | 0.8567 | 0.9786 |
|
85 |
+
|
86 |
+
|
87 |
+
### Framework versions
|
88 |
+
|
89 |
+
- Transformers 4.35.2
|
90 |
+
- Pytorch 2.0.1+cpu
|
91 |
+
- Datasets 2.15.0
|
92 |
+
- Tokenizers 0.15.0
|
config.json
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "dicta-il/dictabert",
|
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": "S-ANG",
|
14 |
+
"1": "B-ANG",
|
15 |
+
"2": "I-ANG",
|
16 |
+
"3": "E-ANG",
|
17 |
+
"4": "S-DUC",
|
18 |
+
"5": "B-DUC",
|
19 |
+
"6": "I-DUC",
|
20 |
+
"7": "E-DUC",
|
21 |
+
"8": "B-EVE",
|
22 |
+
"9": "E-EVE",
|
23 |
+
"10": "S-EVE",
|
24 |
+
"11": "I-EVE",
|
25 |
+
"12": "S-FAC",
|
26 |
+
"13": "B-FAC",
|
27 |
+
"14": "E-FAC",
|
28 |
+
"15": "I-FAC",
|
29 |
+
"16": "S-GPE",
|
30 |
+
"17": "B-GPE",
|
31 |
+
"18": "E-GPE",
|
32 |
+
"19": "I-GPE",
|
33 |
+
"20": "S-LOC",
|
34 |
+
"21": "B-LOC",
|
35 |
+
"22": "E-LOC",
|
36 |
+
"23": "I-LOC",
|
37 |
+
"24": "O",
|
38 |
+
"25": "S-ORG",
|
39 |
+
"26": "B-ORG",
|
40 |
+
"27": "E-ORG",
|
41 |
+
"28": "I-ORG",
|
42 |
+
"29": "B-PER",
|
43 |
+
"30": "I-PER",
|
44 |
+
"31": "E-PER",
|
45 |
+
"32": "S-PER",
|
46 |
+
"33": "B-WOA",
|
47 |
+
"34": "E-WOA",
|
48 |
+
"35": "I-WOA",
|
49 |
+
"36": "S-WOA"
|
50 |
+
},
|
51 |
+
"initializer_range": 0.02,
|
52 |
+
"intermediate_size": 3072,
|
53 |
+
"label2id": {
|
54 |
+
"B-ANG": 1,
|
55 |
+
"B-DUC": 5,
|
56 |
+
"B-EVE": 8,
|
57 |
+
"B-FAC": 13,
|
58 |
+
"B-GPE": 17,
|
59 |
+
"B-LOC": 21,
|
60 |
+
"B-ORG": 26,
|
61 |
+
"B-PER": 29,
|
62 |
+
"B-WOA": 33,
|
63 |
+
"E-ANG": 3,
|
64 |
+
"E-DUC": 7,
|
65 |
+
"E-EVE": 9,
|
66 |
+
"E-FAC": 14,
|
67 |
+
"E-GPE": 18,
|
68 |
+
"E-LOC": 22,
|
69 |
+
"E-ORG": 27,
|
70 |
+
"E-PER": 31,
|
71 |
+
"E-WOA": 34,
|
72 |
+
"I-ANG": 2,
|
73 |
+
"I-DUC": 6,
|
74 |
+
"I-EVE": 11,
|
75 |
+
"I-FAC": 15,
|
76 |
+
"I-GPE": 19,
|
77 |
+
"I-LOC": 23,
|
78 |
+
"I-ORG": 28,
|
79 |
+
"I-PER": 30,
|
80 |
+
"I-WOA": 35,
|
81 |
+
"O": 24,
|
82 |
+
"S-ANG": 0,
|
83 |
+
"S-DUC": 4,
|
84 |
+
"S-EVE": 10,
|
85 |
+
"S-FAC": 12,
|
86 |
+
"S-GPE": 16,
|
87 |
+
"S-LOC": 20,
|
88 |
+
"S-ORG": 25,
|
89 |
+
"S-PER": 32,
|
90 |
+
"S-WOA": 36
|
91 |
+
},
|
92 |
+
"layer_norm_eps": 1e-12,
|
93 |
+
"max_position_embeddings": 512,
|
94 |
+
"model_type": "bert",
|
95 |
+
"newmodern": true,
|
96 |
+
"num_attention_heads": 12,
|
97 |
+
"num_hidden_layers": 12,
|
98 |
+
"pad_token_id": 0,
|
99 |
+
"position_embedding_type": "absolute",
|
100 |
+
"torch_dtype": "float32",
|
101 |
+
"transformers_version": "4.35.2",
|
102 |
+
"type_vocab_size": 2,
|
103 |
+
"use_cache": true,
|
104 |
+
"vocab_size": 128000
|
105 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f7c6fdaa2c8139cf8edd9b04d6928b148edfd6f1531847632c4b4f6fc0d6703a
|
3 |
+
size 735156180
|
runs/Dec11_13-50-37_soc-5CG223442L/events.out.tfevents.1702295442.soc-5CG223442L
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:63530312253fffc1a5bafbaf6f69ab8ee0e286139e8ba0b2b8987bf39370df05
|
3 |
+
size 5530
|
runs/Dec11_13-53-45_soc-5CG223442L/events.out.tfevents.1702295627.soc-5CG223442L
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d338cd27b32fb200868bba9a3db4efc9462d3e909e7ee86c5cc231d35ffe60a0
|
3 |
+
size 7771
|
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,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[UNK]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "[CLS]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[SEP]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[PAD]",
|
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 |
+
"5": {
|
44 |
+
"content": "[BLANK]",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": false,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": false,
|
49 |
+
"special": true
|
50 |
+
}
|
51 |
+
},
|
52 |
+
"clean_up_tokenization_spaces": true,
|
53 |
+
"cls_token": "[CLS]",
|
54 |
+
"do_lower_case": true,
|
55 |
+
"mask_token": "[MASK]",
|
56 |
+
"model_max_length": 512,
|
57 |
+
"pad_token": "[PAD]",
|
58 |
+
"sep_token": "[SEP]",
|
59 |
+
"strip_accents": null,
|
60 |
+
"tokenize_chinese_chars": true,
|
61 |
+
"tokenizer_class": "BertTokenizer",
|
62 |
+
"unk_token": "[UNK]"
|
63 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7716b4262e7277768a15f42fafae42546d45f3ea9b2d67763866d55fb693d279
|
3 |
+
size 4155
|
vocab.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0fb90bfa35244d26f0065d1fcd0b5becc3da3d44d616a7e2aacaf6320b9fa2d0
|
3 |
+
size 1500244
|