Commit 1
Browse files- README.md +42 -18
- config.json +31 -30
- merges.txt +0 -0
- model.safetensors +2 -2
- special_tokens_map.json +13 -5
- tokenizer.json +0 -0
- tokenizer_config.json +25 -23
- training_args.bin +1 -1
- vocab.json +0 -0
README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
---
|
2 |
-
license:
|
3 |
-
base_model:
|
4 |
tags:
|
5 |
- generated_from_trainer
|
|
|
|
|
6 |
metrics:
|
7 |
- precision
|
8 |
- recall
|
@@ -10,7 +12,29 @@ metrics:
|
|
10 |
- accuracy
|
11 |
model-index:
|
12 |
- name: bert-finetuned-ner
|
13 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
---
|
15 |
|
16 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
@@ -18,13 +42,13 @@ should probably proofread and complete it, then remove this comment. -->
|
|
18 |
|
19 |
# bert-finetuned-ner
|
20 |
|
21 |
-
This model is a fine-tuned version of [
|
22 |
It achieves the following results on the evaluation set:
|
23 |
-
- Loss: 0.
|
24 |
-
- Precision: 0.
|
25 |
-
- Recall: 0.
|
26 |
-
- F1: 0.
|
27 |
-
- Accuracy: 0.
|
28 |
|
29 |
## Model description
|
30 |
|
@@ -44,8 +68,8 @@ More information needed
|
|
44 |
|
45 |
The following hyperparameters were used during training:
|
46 |
- learning_rate: 2e-05
|
47 |
-
- train_batch_size:
|
48 |
-
- eval_batch_size:
|
49 |
- seed: 42
|
50 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
51 |
- lr_scheduler_type: linear
|
@@ -55,14 +79,14 @@ The following hyperparameters were used during training:
|
|
55 |
|
56 |
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
57 |
|:-------------:|:-----:|:-----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
58 |
-
| 0.
|
59 |
-
| 0.
|
60 |
-
| 0.
|
61 |
|
62 |
|
63 |
### Framework versions
|
64 |
|
65 |
-
- Transformers 4.
|
66 |
-
- Pytorch 2.1.
|
67 |
-
- Datasets 2.
|
68 |
-
- Tokenizers 0.15.
|
|
|
1 |
---
|
2 |
+
license: mit
|
3 |
+
base_model: FacebookAI/roberta-large
|
4 |
tags:
|
5 |
- generated_from_trainer
|
6 |
+
datasets:
|
7 |
+
- few-nerd
|
8 |
metrics:
|
9 |
- precision
|
10 |
- recall
|
|
|
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: few-nerd
|
21 |
+
type: few-nerd
|
22 |
+
config: supervised
|
23 |
+
split: validation
|
24 |
+
args: supervised
|
25 |
+
metrics:
|
26 |
+
- name: Precision
|
27 |
+
type: precision
|
28 |
+
value: 0.7833402370948971
|
29 |
+
- name: Recall
|
30 |
+
type: recall
|
31 |
+
value: 0.8147760612215589
|
32 |
+
- name: F1
|
33 |
+
type: f1
|
34 |
+
value: 0.798748969206943
|
35 |
+
- name: Accuracy
|
36 |
+
type: accuracy
|
37 |
+
value: 0.9425415670481714
|
38 |
---
|
39 |
|
40 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
42 |
|
43 |
# bert-finetuned-ner
|
44 |
|
45 |
+
This model is a fine-tuned version of [FacebookAI/roberta-large](https://huggingface.co/FacebookAI/roberta-large) on the few-nerd dataset.
|
46 |
It achieves the following results on the evaluation set:
|
47 |
+
- Loss: 0.2154
|
48 |
+
- Precision: 0.7833
|
49 |
+
- Recall: 0.8148
|
50 |
+
- F1: 0.7987
|
51 |
+
- Accuracy: 0.9425
|
52 |
|
53 |
## Model description
|
54 |
|
|
|
68 |
|
69 |
The following hyperparameters were used during training:
|
70 |
- learning_rate: 2e-05
|
71 |
+
- train_batch_size: 4
|
72 |
+
- eval_batch_size: 4
|
73 |
- seed: 42
|
74 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
75 |
- lr_scheduler_type: linear
|
|
|
79 |
|
80 |
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|
81 |
|:-------------:|:-----:|:-----:|:---------------:|:---------:|:------:|:------:|:--------:|
|
82 |
+
| 0.1957 | 1.0 | 32942 | 0.1963 | 0.7533 | 0.7992 | 0.7756 | 0.9386 |
|
83 |
+
| 0.1596 | 2.0 | 65884 | 0.2025 | 0.7768 | 0.8063 | 0.7913 | 0.9416 |
|
84 |
+
| 0.1207 | 3.0 | 98826 | 0.2154 | 0.7833 | 0.8148 | 0.7987 | 0.9425 |
|
85 |
|
86 |
|
87 |
### Framework versions
|
88 |
|
89 |
+
- Transformers 4.35.2
|
90 |
+
- Pytorch 2.1.1+cu118
|
91 |
+
- Datasets 2.15.0
|
92 |
+
- Tokenizers 0.15.0
|
config.json
CHANGED
@@ -1,48 +1,49 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "
|
3 |
"architectures": [
|
4 |
-
"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
|
|
7 |
"classifier_dropout": null,
|
8 |
-
"
|
9 |
"hidden_act": "gelu",
|
10 |
"hidden_dropout_prob": 0.1,
|
11 |
-
"hidden_size":
|
12 |
"id2label": {
|
13 |
"0": "O",
|
14 |
-
"1": "
|
15 |
-
"2": "
|
16 |
-
"3": "
|
17 |
-
"4": "
|
18 |
-
"5": "
|
19 |
-
"6": "
|
20 |
-
"7": "
|
21 |
-
"8": "
|
22 |
},
|
23 |
"initializer_range": 0.02,
|
24 |
-
"intermediate_size":
|
25 |
"label2id": {
|
26 |
-
"
|
27 |
-
"
|
28 |
-
"
|
29 |
-
"
|
30 |
-
"
|
31 |
-
"
|
32 |
-
"
|
33 |
-
"
|
34 |
-
"
|
35 |
},
|
36 |
-
"layer_norm_eps": 1e-
|
37 |
-
"max_position_embeddings":
|
38 |
-
"model_type": "
|
39 |
-
"num_attention_heads":
|
40 |
-
"num_hidden_layers":
|
41 |
-
"pad_token_id":
|
42 |
"position_embedding_type": "absolute",
|
43 |
"torch_dtype": "float32",
|
44 |
"transformers_version": "4.35.2",
|
45 |
-
"type_vocab_size":
|
46 |
"use_cache": true,
|
47 |
-
"vocab_size":
|
48 |
}
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "FacebookAI/roberta-large",
|
3 |
"architectures": [
|
4 |
+
"RobertaForTokenClassification"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
"hidden_act": "gelu",
|
11 |
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 1024,
|
13 |
"id2label": {
|
14 |
"0": "O",
|
15 |
+
"1": "art",
|
16 |
+
"2": "building",
|
17 |
+
"3": "event",
|
18 |
+
"4": "location",
|
19 |
+
"5": "organization",
|
20 |
+
"6": "other",
|
21 |
+
"7": "person",
|
22 |
+
"8": "product"
|
23 |
},
|
24 |
"initializer_range": 0.02,
|
25 |
+
"intermediate_size": 4096,
|
26 |
"label2id": {
|
27 |
+
"O": "0",
|
28 |
+
"art": "1",
|
29 |
+
"building": "2",
|
30 |
+
"event": "3",
|
31 |
+
"location": "4",
|
32 |
+
"organization": "5",
|
33 |
+
"other": "6",
|
34 |
+
"person": "7",
|
35 |
+
"product": "8"
|
36 |
},
|
37 |
+
"layer_norm_eps": 1e-05,
|
38 |
+
"max_position_embeddings": 514,
|
39 |
+
"model_type": "roberta",
|
40 |
+
"num_attention_heads": 16,
|
41 |
+
"num_hidden_layers": 24,
|
42 |
+
"pad_token_id": 1,
|
43 |
"position_embedding_type": "absolute",
|
44 |
"torch_dtype": "float32",
|
45 |
"transformers_version": "4.35.2",
|
46 |
+
"type_vocab_size": 1,
|
47 |
"use_cache": true,
|
48 |
+
"vocab_size": 50265
|
49 |
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7e57fc58e48e854e51bbd243cc40534a8dad25924f828725bad0a8d1181704c0
|
3 |
+
size 1417325484
|
special_tokens_map.json
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
{
|
2 |
-
"
|
3 |
-
"
|
4 |
-
"
|
5 |
-
"
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
|
|
1 |
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"cls_token": "<s>",
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "<mask>",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "<pad>",
|
13 |
+
"sep_token": "</s>",
|
14 |
+
"unk_token": "<unk>"
|
15 |
}
|
tokenizer.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
CHANGED
@@ -1,55 +1,57 @@
|
|
1 |
{
|
|
|
2 |
"added_tokens_decoder": {
|
3 |
"0": {
|
4 |
-
"content": "
|
5 |
"lstrip": false,
|
6 |
-
"normalized":
|
7 |
"rstrip": false,
|
8 |
"single_word": false,
|
9 |
"special": true
|
10 |
},
|
11 |
-
"
|
12 |
-
"content": "
|
13 |
"lstrip": false,
|
14 |
-
"normalized":
|
15 |
"rstrip": false,
|
16 |
"single_word": false,
|
17 |
"special": true
|
18 |
},
|
19 |
-
"
|
20 |
-
"content": "
|
21 |
"lstrip": false,
|
22 |
-
"normalized":
|
23 |
"rstrip": false,
|
24 |
"single_word": false,
|
25 |
"special": true
|
26 |
},
|
27 |
-
"
|
28 |
-
"content": "
|
29 |
"lstrip": false,
|
30 |
-
"normalized":
|
31 |
"rstrip": false,
|
32 |
"single_word": false,
|
33 |
"special": true
|
34 |
},
|
35 |
-
"
|
36 |
-
"content": "
|
37 |
-
"lstrip":
|
38 |
"normalized": false,
|
39 |
"rstrip": false,
|
40 |
"single_word": false,
|
41 |
"special": true
|
42 |
}
|
43 |
},
|
|
|
44 |
"clean_up_tokenization_spaces": true,
|
45 |
-
"cls_token": "
|
46 |
-
"
|
47 |
-
"
|
|
|
48 |
"model_max_length": 512,
|
49 |
-
"pad_token": "
|
50 |
-
"sep_token": "
|
51 |
-
"
|
52 |
-
"
|
53 |
-
"
|
54 |
-
"unk_token": "[UNK]"
|
55 |
}
|
|
|
1 |
{
|
2 |
+
"add_prefix_space": true,
|
3 |
"added_tokens_decoder": {
|
4 |
"0": {
|
5 |
+
"content": "<s>",
|
6 |
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
"rstrip": false,
|
9 |
"single_word": false,
|
10 |
"special": true
|
11 |
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
"rstrip": false,
|
17 |
"single_word": false,
|
18 |
"special": true
|
19 |
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
"rstrip": false,
|
25 |
"single_word": false,
|
26 |
"special": true
|
27 |
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
"rstrip": false,
|
33 |
"single_word": false,
|
34 |
"special": true
|
35 |
},
|
36 |
+
"50264": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
"normalized": false,
|
40 |
"rstrip": false,
|
41 |
"single_word": false,
|
42 |
"special": true
|
43 |
}
|
44 |
},
|
45 |
+
"bos_token": "<s>",
|
46 |
"clean_up_tokenization_spaces": true,
|
47 |
+
"cls_token": "<s>",
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"errors": "replace",
|
50 |
+
"mask_token": "<mask>",
|
51 |
"model_max_length": 512,
|
52 |
+
"pad_token": "<pad>",
|
53 |
+
"sep_token": "</s>",
|
54 |
+
"tokenizer_class": "RobertaTokenizer",
|
55 |
+
"trim_offsets": true,
|
56 |
+
"unk_token": "<unk>"
|
|
|
57 |
}
|
training_args.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 4600
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8a45f7688d7fa188cd32f8cc229a17aec1b0e243797ee4689e48ac4890ba78e3
|
3 |
size 4600
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|