Training complete
Browse files- README.md +93 -0
- config.json +47 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: apache-2.0
|
4 |
+
base_model: distilbert-base-cased
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
datasets:
|
8 |
+
- conll2003
|
9 |
+
metrics:
|
10 |
+
- precision
|
11 |
+
- recall
|
12 |
+
- f1
|
13 |
+
- accuracy
|
14 |
+
model-index:
|
15 |
+
- name: bert-finetuned-ner
|
16 |
+
results:
|
17 |
+
- task:
|
18 |
+
name: Token Classification
|
19 |
+
type: token-classification
|
20 |
+
dataset:
|
21 |
+
name: conll2003
|
22 |
+
type: conll2003
|
23 |
+
config: conll2003
|
24 |
+
split: validation
|
25 |
+
args: conll2003
|
26 |
+
metrics:
|
27 |
+
- name: Precision
|
28 |
+
type: precision
|
29 |
+
value: 0.9138952914059928
|
30 |
+
- name: Recall
|
31 |
+
type: recall
|
32 |
+
value: 0.9341972399865365
|
33 |
+
- name: F1
|
34 |
+
type: f1
|
35 |
+
value: 0.9239347536617842
|
36 |
+
- name: Accuracy
|
37 |
+
type: accuracy
|
38 |
+
value: 0.9820156590333785
|
39 |
+
---
|
40 |
+
|
41 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
42 |
+
should probably proofread and complete it, then remove this comment. -->
|
43 |
+
|
44 |
+
# bert-finetuned-ner
|
45 |
+
|
46 |
+
This model is a fine-tuned version of [distilbert-base-cased](https://huggingface.co/distilbert-base-cased) on the conll2003 dataset.
|
47 |
+
It achieves the following results on the evaluation set:
|
48 |
+
- Loss: 0.0748
|
49 |
+
- Precision: 0.9139
|
50 |
+
- Recall: 0.9342
|
51 |
+
- F1: 0.9239
|
52 |
+
- Accuracy: 0.9820
|
53 |
+
|
54 |
+
## Model description
|
55 |
+
|
56 |
+
More information needed
|
57 |
+
|
58 |
+
## Intended uses & limitations
|
59 |
+
|
60 |
+
More information needed
|
61 |
+
|
62 |
+
## Training and evaluation data
|
63 |
+
|
64 |
+
More information needed
|
65 |
+
|
66 |
+
## Training procedure
|
67 |
+
|
68 |
+
### Training hyperparameters
|
69 |
+
|
70 |
+
The following hyperparameters were used during training:
|
71 |
+
- learning_rate: 2e-05
|
72 |
+
- train_batch_size: 8
|
73 |
+
- eval_batch_size: 8
|
74 |
+
- seed: 42
|
75 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
76 |
+
- lr_scheduler_type: linear
|
77 |
+
- num_epochs: 3
|
78 |
+
|
79 |
+
### Training results
|
80 |
+
|
81 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
82 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
83 |
+
| 0.0937 | 1.0 | 1756 | 0.0894 | 0.8737 | 0.9010 | 0.8872 | 0.9733 |
|
84 |
+
| 0.045 | 2.0 | 3512 | 0.0833 | 0.9117 | 0.9258 | 0.9187 | 0.9802 |
|
85 |
+
| 0.0299 | 3.0 | 5268 | 0.0748 | 0.9139 | 0.9342 | 0.9239 | 0.9820 |
|
86 |
+
|
87 |
+
|
88 |
+
### Framework versions
|
89 |
+
|
90 |
+
- Transformers 4.46.1
|
91 |
+
- Pytorch 2.5.1+cpu
|
92 |
+
- Datasets 3.1.0
|
93 |
+
- Tokenizers 0.20.2
|
config.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "distilbert-base-cased",
|
3 |
+
"activation": "gelu",
|
4 |
+
"architectures": [
|
5 |
+
"DistilBertForTokenClassification"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
+
"dim": 768,
|
9 |
+
"dropout": 0.1,
|
10 |
+
"hidden_dim": 3072,
|
11 |
+
"id2label": {
|
12 |
+
"0": "O",
|
13 |
+
"1": "B-PER",
|
14 |
+
"2": "I-PER",
|
15 |
+
"3": "B-ORG",
|
16 |
+
"4": "I-ORG",
|
17 |
+
"5": "B-LOC",
|
18 |
+
"6": "I-LOC",
|
19 |
+
"7": "B-MISC",
|
20 |
+
"8": "I-MISC"
|
21 |
+
},
|
22 |
+
"initializer_range": 0.02,
|
23 |
+
"label2id": {
|
24 |
+
"B-LOC": 5,
|
25 |
+
"B-MISC": 7,
|
26 |
+
"B-ORG": 3,
|
27 |
+
"B-PER": 1,
|
28 |
+
"I-LOC": 6,
|
29 |
+
"I-MISC": 8,
|
30 |
+
"I-ORG": 4,
|
31 |
+
"I-PER": 2,
|
32 |
+
"O": 0
|
33 |
+
},
|
34 |
+
"max_position_embeddings": 512,
|
35 |
+
"model_type": "distilbert",
|
36 |
+
"n_heads": 12,
|
37 |
+
"n_layers": 6,
|
38 |
+
"output_past": true,
|
39 |
+
"pad_token_id": 0,
|
40 |
+
"qa_dropout": 0.1,
|
41 |
+
"seq_classif_dropout": 0.2,
|
42 |
+
"sinusoidal_pos_embds": false,
|
43 |
+
"tie_weights_": true,
|
44 |
+
"torch_dtype": "float32",
|
45 |
+
"transformers_version": "4.46.1",
|
46 |
+
"vocab_size": 28996
|
47 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cf9f96cf47861d34360554809ea765a490c1283a9aef8efdce164c0588fa52fa
|
3 |
+
size 260803668
|
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": false,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": false,
|
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:04d3f603c2db1f955813f8493e5ed4ef6014e25b8b3cfca70096c64bce93343f
|
3 |
+
size 5240
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|