model update
Browse files- README.md +124 -0
- config.json +1 -1
- eval/metric.json +1 -0
- eval/metric_span.json +1 -0
- eval/prediction.validation.json +0 -0
- pytorch_model.bin +2 -2
- tokenizer_config.json +1 -1
- trainer_config.json +1 -0
README.md
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- conll2003
|
4 |
+
metrics:
|
5 |
+
- f1
|
6 |
+
- precision
|
7 |
+
- recall
|
8 |
+
model-index:
|
9 |
+
- name: tner/roberta-large-conll2003
|
10 |
+
results:
|
11 |
+
- task:
|
12 |
+
name: Token Classification
|
13 |
+
type: token-classification
|
14 |
+
dataset:
|
15 |
+
name: conll2003
|
16 |
+
type: conll2003
|
17 |
+
args: conll2003
|
18 |
+
metrics:
|
19 |
+
- name: F1
|
20 |
+
type: f1
|
21 |
+
value: 0.924769027716674
|
22 |
+
- name: Precision
|
23 |
+
type: precision
|
24 |
+
value: 0.9191883855168795
|
25 |
+
- name: Recall
|
26 |
+
type: recall
|
27 |
+
value: 0.9304178470254958
|
28 |
+
- name: F1 (macro)
|
29 |
+
type: f1_macro
|
30 |
+
value: 0.9110950780089749
|
31 |
+
- name: Precision (macro)
|
32 |
+
type: precision_macro
|
33 |
+
value: 0.9030546238754271
|
34 |
+
- name: Recall (macro)
|
35 |
+
type: recall_macro
|
36 |
+
value: 0.9197126371122274
|
37 |
+
- name: F1 (entity span)
|
38 |
+
type: f1_entity_span
|
39 |
+
value: 0.9619852164730729
|
40 |
+
- name: Precision (entity span)
|
41 |
+
type: precision_entity_span
|
42 |
+
value: 0.9562631210636809
|
43 |
+
- name: Recall (entity span)
|
44 |
+
type: recall_entity_span
|
45 |
+
value: 0.9677762039660056
|
46 |
+
|
47 |
+
pipeline_tag: token-classification
|
48 |
+
widget:
|
49 |
+
- text: "Jacob Collier is a Grammy awarded artist from England."
|
50 |
+
example_title: "NER Example 1"
|
51 |
+
---
|
52 |
+
# tner/roberta-large-conll2003
|
53 |
+
|
54 |
+
This model is a fine-tuned version of [roberta-large](https://huggingface.co/roberta-large) on the
|
55 |
+
[tner/conll2003](https://huggingface.co/datasets/tner/conll2003) dataset.
|
56 |
+
Model fine-tuning is done via [T-NER](https://github.com/asahi417/tner)'s hyper-parameter search (see the repository
|
57 |
+
for more detail). It achieves the following results on the test set:
|
58 |
+
- F1 (micro): 0.924769027716674
|
59 |
+
- Precision (micro): 0.9191883855168795
|
60 |
+
- Recall (micro): 0.9304178470254958
|
61 |
+
- F1 (macro): 0.9110950780089749
|
62 |
+
- Precision (macro): 0.9030546238754271
|
63 |
+
- Recall (macro): 0.9197126371122274
|
64 |
+
|
65 |
+
The per-entity breakdown of the F1 score on the test set are below:
|
66 |
+
- location: 0.9390573401380967
|
67 |
+
- organization: 0.9107142857142857
|
68 |
+
- other: 0.8247422680412372
|
69 |
+
- person: 0.9698664181422801
|
70 |
+
|
71 |
+
For F1 scores, the confidence interval is obtained by bootstrap as below:
|
72 |
+
- F1 (micro):
|
73 |
+
- 90%: [0.9185189408755685, 0.9309806929048586]
|
74 |
+
- 95%: [0.9174010190551032, 0.9318590917100465]
|
75 |
+
- F1 (macro):
|
76 |
+
- 90%: [0.9185189408755685, 0.9309806929048586]
|
77 |
+
- 95%: [0.9174010190551032, 0.9318590917100465]
|
78 |
+
|
79 |
+
Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/roberta-large-conll2003/raw/main/eval/metric.json)
|
80 |
+
and [metric file of entity span](https://huggingface.co/tner/roberta-large-conll2003/raw/main/eval/metric_span.json).
|
81 |
+
|
82 |
+
|
83 |
+
### Training hyperparameters
|
84 |
+
|
85 |
+
The following hyperparameters were used during training:
|
86 |
+
- dataset: ['tner/conll2003']
|
87 |
+
- dataset_split: train
|
88 |
+
- dataset_name: None
|
89 |
+
- local_dataset: None
|
90 |
+
- model: roberta-large
|
91 |
+
- crf: True
|
92 |
+
- max_length: 128
|
93 |
+
- epoch: 17
|
94 |
+
- batch_size: 64
|
95 |
+
- lr: 1e-05
|
96 |
+
- random_seed: 42
|
97 |
+
- gradient_accumulation_steps: 1
|
98 |
+
- weight_decay: None
|
99 |
+
- lr_warmup_step_ratio: 0.1
|
100 |
+
- max_grad_norm: 10.0
|
101 |
+
|
102 |
+
The full configuration can be found at [fine-tuning parameter file](https://huggingface.co/tner/roberta-large-conll2003/raw/main/trainer_config.json).
|
103 |
+
|
104 |
+
### Reference
|
105 |
+
If you use any resource from T-NER, please consider to cite our [paper](https://aclanthology.org/2021.eacl-demos.7/).
|
106 |
+
|
107 |
+
```
|
108 |
+
|
109 |
+
@inproceedings{ushio-camacho-collados-2021-ner,
|
110 |
+
title = "{T}-{NER}: An All-Round Python Library for Transformer-based Named Entity Recognition",
|
111 |
+
author = "Ushio, Asahi and
|
112 |
+
Camacho-Collados, Jose",
|
113 |
+
booktitle = "Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations",
|
114 |
+
month = apr,
|
115 |
+
year = "2021",
|
116 |
+
address = "Online",
|
117 |
+
publisher = "Association for Computational Linguistics",
|
118 |
+
url = "https://aclanthology.org/2021.eacl-demos.7",
|
119 |
+
doi = "10.18653/v1/2021.eacl-demos.7",
|
120 |
+
pages = "53--62",
|
121 |
+
abstract = "Language model (LM) pretraining has led to consistent improvements in many NLP downstream tasks, including named entity recognition (NER). In this paper, we present T-NER (Transformer-based Named Entity Recognition), a Python library for NER LM finetuning. In addition to its practical utility, T-NER facilitates the study and investigation of the cross-domain and cross-lingual generalization ability of LMs finetuned on NER. Our library also provides a web app where users can get model predictions interactively for arbitrary text, which facilitates qualitative model evaluation for non-expert programmers. We show the potential of the library by compiling nine public NER datasets into a unified format and evaluating the cross-domain and cross- lingual performance across the datasets. The results from our initial experiments show that in-domain performance is generally competitive across datasets. However, cross-domain generalization is challenging even with a large pretrained LM, which has nevertheless capacity to learn domain-specific features if fine- tuned on a combined dataset. To facilitate future research, we also release all our LM checkpoints via the Hugging Face model hub.",
|
122 |
+
}
|
123 |
+
|
124 |
+
```
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "tner_ckpt/conll2003_roberta_large/
|
3 |
"architectures": [
|
4 |
"RobertaForTokenClassification"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "tner_ckpt/conll2003_roberta_large/model_rcsnba/epoch_16",
|
3 |
"architectures": [
|
4 |
"RobertaForTokenClassification"
|
5 |
],
|
eval/metric.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"micro/f1": 0.924769027716674, "micro/f1_ci": {"90": [0.9185189408755685, 0.9309806929048586], "95": [0.9174010190551032, 0.9318590917100465]}, "micro/recall": 0.9304178470254958, "micro/precision": 0.9191883855168795, "macro/f1": 0.9110950780089749, "macro/f1_ci": {"90": [0.9037658968420902, 0.9180195035939583], "95": [0.9025770150365444, 0.9194742929481238]}, "macro/recall": 0.9197126371122274, "macro/precision": 0.9030546238754271, "per_entity_metric": {"location": {"f1": 0.9390573401380967, "f1_ci": {"90": [0.9313965104630062, 0.9466090331717206], "95": [0.9300843094139872, 0.9479665926179084]}, "precision": 0.9404690318701142, "recall": 0.9376498800959233}, "organization": {"f1": 0.9107142857142857, "f1_ci": {"90": [0.9007880638693908, 0.9204616266778444], "95": [0.8990486734098716, 0.9225422754373195]}, "precision": 0.9005297233666862, "recall": 0.9211318482841662}, "other": {"f1": 0.8247422680412372, "f1_ci": {"90": [0.805305076465003, 0.8442077230359522], "95": [0.8014114890584008, 0.8477429372112399]}, "precision": 0.796812749003984, "recall": 0.8547008547008547}, "person": {"f1": 0.9698664181422801, "f1_ci": {"90": [0.9624360457807172, 0.9764181563647193], "95": [0.9610383119046899, 0.9773602066916893]}, "precision": 0.9744069912609239, "recall": 0.9653679653679653}}}
|
eval/metric_span.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"micro/f1": 0.9619852164730729, "micro/f1_ci": {"90": [0.9577645343622905, 0.9662569291727845], "95": [0.9566146856431471, 0.9669190537417556]}, "micro/recall": 0.9677762039660056, "micro/precision": 0.9562631210636809, "macro/f1": 0.9619852164730729, "macro/f1_ci": {"90": [0.9577645343622905, 0.9662569291727845], "95": [0.9566146856431471, 0.9669190537417556]}, "macro/recall": 0.9677762039660056, "macro/precision": 0.9562631210636809}
|
eval/prediction.validation.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pytorch_model.bin
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:25de4402a9051fc455e281bac160fd20d206f45fc6b48f16ce0c802e8c81a085
|
3 |
+
size 1417414001
|
tokenizer_config.json
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
"errors": "replace",
|
7 |
"mask_token": "<mask>",
|
8 |
"model_max_length": 512,
|
9 |
-
"name_or_path": "tner_ckpt/conll2003_roberta_large/
|
10 |
"pad_token": "<pad>",
|
11 |
"sep_token": "</s>",
|
12 |
"special_tokens_map_file": null,
|
|
|
6 |
"errors": "replace",
|
7 |
"mask_token": "<mask>",
|
8 |
"model_max_length": 512,
|
9 |
+
"name_or_path": "tner_ckpt/conll2003_roberta_large/model_rcsnba/epoch_16",
|
10 |
"pad_token": "<pad>",
|
11 |
"sep_token": "</s>",
|
12 |
"special_tokens_map_file": null,
|
trainer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"dataset": ["tner/conll2003"], "dataset_split": "train", "dataset_name": null, "local_dataset": null, "model": "roberta-large", "crf": true, "max_length": 128, "epoch": 17, "batch_size": 64, "lr": 1e-05, "random_seed": 42, "gradient_accumulation_steps": 1, "weight_decay": null, "lr_warmup_step_ratio": 0.1, "max_grad_norm": 10.0}
|