asahi417 commited on
Commit
7602d6b
1 Parent(s): c95db0a

model update

Browse files
README.md ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - tner/tweetner7
4
+ metrics:
5
+ - f1
6
+ - precision
7
+ - recall
8
+ model-index:
9
+ - name: tner/roberta-large-tweetner7-2020-2021-continuous
10
+ results:
11
+ - task:
12
+ name: Token Classification
13
+ type: token-classification
14
+ dataset:
15
+ name: tner/tweetner7/test_2021
16
+ type: tner/tweetner7/test_2021
17
+ args: tner/tweetner7/test_2021
18
+ metrics:
19
+ - name: F1
20
+ type: f1
21
+ value: 0.6602098466505246
22
+ - name: Precision
23
+ type: precision
24
+ value: 0.6583122556909634
25
+ - name: Recall
26
+ type: recall
27
+ value: 0.6621184088806661
28
+ - name: F1 (macro)
29
+ type: f1_macro
30
+ value: 0.6089541397781462
31
+ - name: Precision (macro)
32
+ type: precision_macro
33
+ value: 0.6063426866310634
34
+ - name: Recall (macro)
35
+ type: recall_macro
36
+ value: 0.6145764579798109
37
+ - name: F1 (entity span)
38
+ type: f1_entity_span
39
+ value: 0.791351974632459
40
+ - name: Precision (entity span)
41
+ type: precision_entity_span
42
+ value: 0.78903196137043
43
+ - name: Recall (entity span)
44
+ type: recall_entity_span
45
+ value: 0.7936856713310975
46
+ - task:
47
+ name: Token Classification
48
+ type: token-classification
49
+ dataset:
50
+ name: tner/tweetner7/test_2020
51
+ type: tner/tweetner7/test_2020
52
+ args: tner/tweetner7/test_2020
53
+ metrics:
54
+ - name: F1
55
+ type: f1
56
+ value: 0.6626406807576174
57
+ - name: Precision
58
+ type: precision
59
+ value: 0.7033799533799534
60
+ - name: Recall
61
+ type: recall
62
+ value: 0.6263622210690192
63
+ - name: F1 (macro)
64
+ type: f1_macro
65
+ value: 0.6239587887403221
66
+ - name: Precision (macro)
67
+ type: precision_macro
68
+ value: 0.6646899818440488
69
+ - name: Recall (macro)
70
+ type: recall_macro
71
+ value: 0.5921933163664825
72
+ - name: F1 (entity span)
73
+ type: f1_entity_span
74
+ value: 0.7644151565074135
75
+ - name: Precision (entity span)
76
+ type: precision_entity_span
77
+ value: 0.8116618075801749
78
+ - name: Recall (entity span)
79
+ type: recall_entity_span
80
+ value: 0.7223663725998962
81
+
82
+ pipeline_tag: token-classification
83
+ widget:
84
+ - text: "Get the all-analog Classic Vinyl Edition of `Takin' Off` Album from {{@Herbie Hancock@}} via {{USERNAME}} link below: {{URL}}"
85
+ example_title: "NER Example 1"
86
+ ---
87
+ # tner/roberta-large-tweetner7-2020-2021-continuous
88
+
89
+ This model is a fine-tuned version of [tner/roberta-large-tweetner-2020](https://huggingface.co/tner/roberta-large-tweetner-2020) on the
90
+ [tner/tweetner7](https://huggingface.co/datasets/tner/tweetner7) dataset (`train_2021` split). The model is first fine-tuned on `train_2020`, and then continuously fine-tuned on `train_2021`.
91
+ Model fine-tuning is done via [T-NER](https://github.com/asahi417/tner)'s hyper-parameter search (see the repository
92
+ for more detail). It achieves the following results on the test set of 2021:
93
+ - F1 (micro): 0.6602098466505246
94
+ - Precision (micro): 0.6583122556909634
95
+ - Recall (micro): 0.6621184088806661
96
+ - F1 (macro): 0.6089541397781462
97
+ - Precision (macro): 0.6063426866310634
98
+ - Recall (macro): 0.6145764579798109
99
+
100
+
101
+
102
+ The per-entity breakdown of the F1 score on the test set are below:
103
+ - corporation: 0.5315217391304348
104
+ - creative_work: 0.44416243654822335
105
+ - event: 0.48787728847105394
106
+ - group: 0.6115476597198496
107
+ - location: 0.6740692357935989
108
+ - person: 0.8471820809248555
109
+ - product: 0.6663185378590079
110
+
111
+ For F1 scores, the confidence interval is obtained by bootstrap as below:
112
+ - F1 (micro):
113
+ - 90%: [0.6517159585889167, 0.6692301926939467]
114
+ - 95%: [0.6493037560449608, 0.6705545707079725]
115
+ - F1 (macro):
116
+ - 90%: [0.6517159585889167, 0.6692301926939467]
117
+ - 95%: [0.6493037560449608, 0.6705545707079725]
118
+
119
+ Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/roberta-large-tweetner7-2020-2021-continuous/raw/main/eval/metric.json)
120
+ and [metric file of entity span](https://huggingface.co/tner/roberta-large-tweetner7-2020-2021-continuous/raw/main/eval/metric_span.json).
121
+
122
+ ### Usage
123
+ This model can be used through the [tner library](https://github.com/asahi417/tner). Install the library via pip
124
+ ```shell
125
+ pip install tner
126
+ ```
127
+ and activate model as below.
128
+ ```python
129
+ from tner import TransformersNER
130
+ model = TransformersNER("tner/roberta-large-tweetner7-2020-2021-continuous")
131
+ model.predict(["Jacob Collier is a Grammy awarded English artist from London"])
132
+ ```
133
+ It can be used via transformers library but it is not recommended as CRF layer is not supported at the moment.
134
+
135
+ ### Training hyperparameters
136
+
137
+ The following hyperparameters were used during training:
138
+ - dataset: ['tner/tweetner7']
139
+ - dataset_split: train_2021
140
+ - dataset_name: None
141
+ - local_dataset: None
142
+ - model: tner/roberta-large-tweetner-2020
143
+ - crf: True
144
+ - max_length: 128
145
+ - epoch: 30
146
+ - batch_size: 32
147
+ - lr: 1e-06
148
+ - random_seed: 0
149
+ - gradient_accumulation_steps: 1
150
+ - weight_decay: 1e-07
151
+ - lr_warmup_step_ratio: 0.3
152
+ - max_grad_norm: 1
153
+
154
+ The full configuration can be found at [fine-tuning parameter file](https://huggingface.co/tner/roberta-large-tweetner7-2020-2021-continuous/raw/main/trainer_config.json).
155
+
156
+ ### Reference
157
+ If you use any resource from T-NER, please consider to cite our [paper](https://aclanthology.org/2021.eacl-demos.7/).
158
+
159
+ ```
160
+
161
+ @inproceedings{ushio-camacho-collados-2021-ner,
162
+ title = "{T}-{NER}: An All-Round Python Library for Transformer-based Named Entity Recognition",
163
+ author = "Ushio, Asahi and
164
+ Camacho-Collados, Jose",
165
+ booktitle = "Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations",
166
+ month = apr,
167
+ year = "2021",
168
+ address = "Online",
169
+ publisher = "Association for Computational Linguistics",
170
+ url = "https://aclanthology.org/2021.eacl-demos.7",
171
+ doi = "10.18653/v1/2021.eacl-demos.7",
172
+ pages = "53--62",
173
+ 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.",
174
+ }
175
+
176
+ ```
eval/metric.json DELETED
@@ -1 +0,0 @@
1
- {"2021.dev": {"micro/f1": 0.6493638676844784, "micro/f1_ci": {}, "micro/recall": 0.638, "micro/precision": 0.661139896373057, "macro/f1": 0.6064563940502387, "macro/f1_ci": {}, "macro/recall": 0.5954284242860318, "macro/precision": 0.6210253991075032, "per_entity_metric": {"corporation": {"f1": 0.5797101449275363, "f1_ci": {}, "precision": 0.5714285714285714, "recall": 0.5882352941176471}, "creative_work": {"f1": 0.4805194805194805, "f1_ci": {}, "precision": 0.4625, "recall": 0.5}, "event": {"f1": 0.4472573839662447, "f1_ci": {}, "precision": 0.5, "recall": 0.40458015267175573}, "group": {"f1": 0.6340326340326341, "f1_ci": {}, "precision": 0.6732673267326733, "recall": 0.5991189427312775}, "location": {"f1": 0.676470588235294, "f1_ci": {}, "precision": 0.71875, "recall": 0.6388888888888888}, "person": {"f1": 0.8197278911564626, "f1_ci": {}, "precision": 0.7901639344262295, "recall": 0.8515901060070671}, "product": {"f1": 0.6074766355140188, "f1_ci": {}, "precision": 0.6310679611650486, "recall": 0.5855855855855856}}}, "2021.test": {"micro/f1": 0.6602098466505246, "micro/f1_ci": {"90": [0.6517159585889167, 0.6692301926939467], "95": [0.6493037560449608, 0.6705545707079725]}, "micro/recall": 0.6621184088806661, "micro/precision": 0.6583122556909634, "macro/f1": 0.6089541397781462, "macro/f1_ci": {"90": [0.5992124192664839, 0.6181423707734851], "95": [0.5972392466243823, 0.6207098127019401]}, "macro/recall": 0.6145764579798109, "macro/precision": 0.6063426866310634, "per_entity_metric": {"corporation": {"f1": 0.5315217391304348, "f1_ci": {"90": [0.5062037953042462, 0.557002893455922], "95": [0.5029997910370321, 0.5630029363336992]}, "precision": 0.5202127659574468, "recall": 0.5433333333333333}, "creative_work": {"f1": 0.44416243654822335, "f1_ci": {"90": [0.4122197188872424, 0.47462918144124866], "95": [0.406035622185493, 0.4795]}, "precision": 0.41420118343195267, "recall": 0.478796169630643}, "event": {"f1": 0.48787728847105394, "f1_ci": {"90": [0.4644448167194252, 0.5105902072328322], "95": [0.45939395779891246, 0.5167725537147063]}, "precision": 0.53470715835141, "recall": 0.44858962693357596}, "group": {"f1": 0.6115476597198496, "f1_ci": {"90": [0.5919094922318341, 0.6339441441403232], "95": [0.5886699796091751, 0.639161660780465]}, "precision": 0.6352022711142654, "recall": 0.5895915678524374}, "location": {"f1": 0.6740692357935989, "f1_ci": {"90": [0.6463384301732925, 0.6996206891806976], "95": [0.6399452184154117, 0.704592239580396]}, "precision": 0.6331288343558282, "recall": 0.7206703910614525}, "person": {"f1": 0.8471820809248555, "f1_ci": {"90": [0.8364545587859473, 0.8578287867782268], "95": [0.8343356681910271, 0.8597832152335898]}, "precision": 0.8303824362606232, "recall": 0.8646755162241888}, "product": {"f1": 0.6663185378590079, "f1_ci": {"90": [0.6430440201857166, 0.6880601156195403], "95": [0.6389027898322917, 0.6912792458554788]}, "precision": 0.6765641569459173, "recall": 0.6563786008230452}}}, "2020.test": {"micro/f1": 0.6626406807576174, "micro/f1_ci": {"90": [0.6421811481777288, 0.6824408527817176], "95": [0.6372901150251117, 0.6854804698319146]}, "micro/recall": 0.6263622210690192, "micro/precision": 0.7033799533799534, "macro/f1": 0.6239587887403221, "macro/f1_ci": {"90": [0.602302727331785, 0.6450629596325671], "95": [0.5970260956556793, 0.6489300269035955]}, "macro/recall": 0.5921933163664825, "macro/precision": 0.6646899818440488, "per_entity_metric": {"corporation": {"f1": 0.5775401069518716, "f1_ci": {"90": [0.5159532401719902, 0.631592039800995], "95": [0.5048681813824177, 0.6443506817426007]}, "precision": 0.5901639344262295, "recall": 0.5654450261780105}, "creative_work": {"f1": 0.5414364640883977, "f1_ci": {"90": [0.48183509569087224, 0.5982905982905983], "95": [0.47114785318559554, 0.6071453442101075]}, "precision": 0.5355191256830601, "recall": 0.547486033519553}, "event": {"f1": 0.4848484848484848, "f1_ci": {"90": [0.430196666372696, 0.5392663954742951], "95": [0.41777510040160637, 0.5480195121951219]}, "precision": 0.5217391304347826, "recall": 0.4528301886792453}, "group": {"f1": 0.5752380952380952, "f1_ci": {"90": [0.5250448836936347, 0.6279727523503913], "95": [0.5077881926419612, 0.6401626025391906]}, "precision": 0.705607476635514, "recall": 0.4855305466237942}, "location": {"f1": 0.676923076923077, "f1_ci": {"90": [0.6140042598509052, 0.7335108890745321], "95": [0.6034973885094416, 0.7419877793680504]}, "precision": 0.6875, "recall": 0.6666666666666666}, "person": {"f1": 0.8333333333333334, "f1_ci": {"90": [0.8072107474406325, 0.8569065343258891], "95": [0.8017923571846364, 0.8613520685620369]}, "precision": 0.8538732394366197, "recall": 0.8137583892617449}, "product": {"f1": 0.6783919597989949, "f1_ci": {"90": [0.6273530339040599, 0.7267773646555122], "95": [0.6158022378645676, 0.7371281899611289]}, "precision": 0.7584269662921348, "recall": 0.6136363636363636}}}, "2021.test (span detection)": {"micro/f1": 0.791351974632459, "micro/f1_ci": {}, "micro/recall": 0.7936856713310975, "micro/precision": 0.78903196137043, "macro/f1": 0.791351974632459, "macro/f1_ci": {}, "macro/recall": 0.7936856713310975, "macro/precision": 0.78903196137043}, "2020.test (span detection)": {"micro/f1": 0.7644151565074135, "micro/f1_ci": {}, "micro/recall": 0.7223663725998962, "micro/precision": 0.8116618075801749, "macro/f1": 0.7644151565074135, "macro/f1_ci": {}, "macro/recall": 0.7223663725998962, "macro/precision": 0.8116618075801749}}
 
 
eval/metric.test_2020.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.6626406807576174, "micro/f1_ci": {"90": [0.6421811481777288, 0.6824408527817176], "95": [0.6372901150251117, 0.6854804698319146]}, "micro/recall": 0.6263622210690192, "micro/precision": 0.7033799533799534, "macro/f1": 0.6239587887403221, "macro/f1_ci": {"90": [0.602302727331785, 0.6450629596325671], "95": [0.5970260956556793, 0.6489300269035955]}, "macro/recall": 0.5921933163664825, "macro/precision": 0.6646899818440488, "per_entity_metric": {"corporation": {"f1": 0.5775401069518716, "f1_ci": {"90": [0.5159532401719902, 0.631592039800995], "95": [0.5048681813824177, 0.6443506817426007]}, "precision": 0.5901639344262295, "recall": 0.5654450261780105}, "creative_work": {"f1": 0.5414364640883977, "f1_ci": {"90": [0.48183509569087224, 0.5982905982905983], "95": [0.47114785318559554, 0.6071453442101075]}, "precision": 0.5355191256830601, "recall": 0.547486033519553}, "event": {"f1": 0.4848484848484848, "f1_ci": {"90": [0.430196666372696, 0.5392663954742951], "95": [0.41777510040160637, 0.5480195121951219]}, "precision": 0.5217391304347826, "recall": 0.4528301886792453}, "group": {"f1": 0.5752380952380952, "f1_ci": {"90": [0.5250448836936347, 0.6279727523503913], "95": [0.5077881926419612, 0.6401626025391906]}, "precision": 0.705607476635514, "recall": 0.4855305466237942}, "location": {"f1": 0.676923076923077, "f1_ci": {"90": [0.6140042598509052, 0.7335108890745321], "95": [0.6034973885094416, 0.7419877793680504]}, "precision": 0.6875, "recall": 0.6666666666666666}, "person": {"f1": 0.8333333333333334, "f1_ci": {"90": [0.8072107474406325, 0.8569065343258891], "95": [0.8017923571846364, 0.8613520685620369]}, "precision": 0.8538732394366197, "recall": 0.8137583892617449}, "product": {"f1": 0.6783919597989949, "f1_ci": {"90": [0.6273530339040599, 0.7267773646555122], "95": [0.6158022378645676, 0.7371281899611289]}, "precision": 0.7584269662921348, "recall": 0.6136363636363636}}}
eval/metric.test_2021.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.6602098466505246, "micro/f1_ci": {"90": [0.6517159585889167, 0.6692301926939467], "95": [0.6493037560449608, 0.6705545707079725]}, "micro/recall": 0.6621184088806661, "micro/precision": 0.6583122556909634, "macro/f1": 0.6089541397781462, "macro/f1_ci": {"90": [0.5992124192664839, 0.6181423707734851], "95": [0.5972392466243823, 0.6207098127019401]}, "macro/recall": 0.6145764579798109, "macro/precision": 0.6063426866310634, "per_entity_metric": {"corporation": {"f1": 0.5315217391304348, "f1_ci": {"90": [0.5062037953042462, 0.557002893455922], "95": [0.5029997910370321, 0.5630029363336992]}, "precision": 0.5202127659574468, "recall": 0.5433333333333333}, "creative_work": {"f1": 0.44416243654822335, "f1_ci": {"90": [0.4122197188872424, 0.47462918144124866], "95": [0.406035622185493, 0.4795]}, "precision": 0.41420118343195267, "recall": 0.478796169630643}, "event": {"f1": 0.48787728847105394, "f1_ci": {"90": [0.4644448167194252, 0.5105902072328322], "95": [0.45939395779891246, 0.5167725537147063]}, "precision": 0.53470715835141, "recall": 0.44858962693357596}, "group": {"f1": 0.6115476597198496, "f1_ci": {"90": [0.5919094922318341, 0.6339441441403232], "95": [0.5886699796091751, 0.639161660780465]}, "precision": 0.6352022711142654, "recall": 0.5895915678524374}, "location": {"f1": 0.6740692357935989, "f1_ci": {"90": [0.6463384301732925, 0.6996206891806976], "95": [0.6399452184154117, 0.704592239580396]}, "precision": 0.6331288343558282, "recall": 0.7206703910614525}, "person": {"f1": 0.8471820809248555, "f1_ci": {"90": [0.8364545587859473, 0.8578287867782268], "95": [0.8343356681910271, 0.8597832152335898]}, "precision": 0.8303824362606232, "recall": 0.8646755162241888}, "product": {"f1": 0.6663185378590079, "f1_ci": {"90": [0.6430440201857166, 0.6880601156195403], "95": [0.6389027898322917, 0.6912792458554788]}, "precision": 0.6765641569459173, "recall": 0.6563786008230452}}}
eval/metric_span.test_2020.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.7644151565074135, "micro/f1_ci": {}, "micro/recall": 0.7223663725998962, "micro/precision": 0.8116618075801749, "macro/f1": 0.7644151565074135, "macro/f1_ci": {}, "macro/recall": 0.7223663725998962, "macro/precision": 0.8116618075801749}
eval/metric_span.test_2021.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.791351974632459, "micro/f1_ci": {}, "micro/recall": 0.7936856713310975, "micro/precision": 0.78903196137043, "macro/f1": 0.791351974632459, "macro/f1_ci": {}, "macro/recall": 0.7936856713310975, "macro/precision": 0.78903196137043}
eval/prediction.2020.dev.json DELETED
The diff for this file is too large to render. See raw diff
 
eval/prediction.2020.test.json DELETED
The diff for this file is too large to render. See raw diff
 
eval/prediction.2021.dev.json DELETED
The diff for this file is too large to render. See raw diff
 
eval/prediction.2021.test.json DELETED
The diff for this file is too large to render. See raw diff
 
trainer_config.json CHANGED
@@ -1 +1 @@
1
- {"data_split": "2021.train", "model": "tner/roberta-large-tweetner-2020", "crf": true, "max_length": 128, "epoch": 30, "batch_size": 32, "lr": 1e-06, "random_seed": 0, "gradient_accumulation_steps": 1, "weight_decay": 1e-07, "lr_warmup_step_ratio": 0.3, "max_grad_norm": 1}
 
1
+ {"dataset": ["tner/tweetner7"], "dataset_split": "train_2021", "dataset_name": null, "local_dataset": null, "model": "tner/roberta-large-tweetner-2020", "crf": true, "max_length": 128, "epoch": 30, "batch_size": 32, "lr": 1e-06, "random_seed": 0, "gradient_accumulation_steps": 1, "weight_decay": 1e-07, "lr_warmup_step_ratio": 0.3, "max_grad_norm": 1}