asahi417 commited on
Commit
55b25e6
1 Parent(s): 4bc04ee

model update

Browse files
README.md ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - wnut2017
4
+ metrics:
5
+ - f1
6
+ - precision
7
+ - recall
8
+ model-index:
9
+ - name: tner/bertweet-large-wnut2017
10
+ results:
11
+ - task:
12
+ name: Token Classification
13
+ type: token-classification
14
+ dataset:
15
+ name: wnut2017
16
+ type: wnut2017
17
+ args: wnut2017
18
+ metrics:
19
+ - name: F1
20
+ type: f1
21
+ value: 0.5302273987798114
22
+ - name: Precision
23
+ type: precision
24
+ value: 0.6602209944751382
25
+ - name: Recall
26
+ type: recall
27
+ value: 0.44300278035217794
28
+ - name: F1 (macro)
29
+ type: f1_macro
30
+ value: 0.4643459997680019
31
+ - name: Precision (macro)
32
+ type: precision_macro
33
+ value: 0.5792841925426832
34
+ - name: Recall (macro)
35
+ type: recall_macro
36
+ value: 0.3973128655628379
37
+ - name: F1 (entity span)
38
+ type: f1_entity_span
39
+ value: 0.6142697881828317
40
+ - name: Precision (entity span)
41
+ type: precision_entity_span
42
+ value: 0.7706293706293706
43
+ - name: Recall (entity span)
44
+ type: recall_entity_span
45
+ value: 0.5106580166821131
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/bertweet-large-wnut2017
53
+
54
+ This model is a fine-tuned version of [vinai/bertweet-large](https://huggingface.co/vinai/bertweet-large) on the
55
+ [tner/wnut2017](https://huggingface.co/datasets/tner/wnut2017) 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.5302273987798114
59
+ - Precision (micro): 0.6602209944751382
60
+ - Recall (micro): 0.44300278035217794
61
+ - F1 (macro): 0.4643459997680019
62
+ - Precision (macro): 0.5792841925426832
63
+ - Recall (macro): 0.3973128655628379
64
+
65
+ The per-entity breakdown of the F1 score on the test set are below:
66
+ - corporation: 0.3902439024390244
67
+ - group: 0.37130801687763715
68
+ - location: 0.6595744680851063
69
+ - person: 0.65474552957359
70
+ - product: 0.2857142857142857
71
+ - work_of_art: 0.4244897959183674
72
+
73
+ For F1 scores, the confidence interval is obtained by bootstrap as below:
74
+ - F1 (micro):
75
+ - 90%: [0.5002577319587629, 0.5587481638299118]
76
+ - 95%: [0.4947163587619384, 0.5629013150503995]
77
+ - F1 (macro):
78
+ - 90%: [0.5002577319587629, 0.5587481638299118]
79
+ - 95%: [0.4947163587619384, 0.5629013150503995]
80
+
81
+ Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/bertweet-large-wnut2017/raw/main/eval/metric.json)
82
+ and [metric file of entity span](https://huggingface.co/tner/bertweet-large-wnut2017/raw/main/eval/metric_span.json).
83
+
84
+
85
+ ### Training hyperparameters
86
+
87
+ The following hyperparameters were used during training:
88
+ - dataset: ['tner/wnut2017']
89
+ - dataset_split: train
90
+ - dataset_name: None
91
+ - local_dataset: None
92
+ - model: vinai/bertweet-large
93
+ - crf: False
94
+ - max_length: 128
95
+ - epoch: 15
96
+ - batch_size: 16
97
+ - lr: 1e-05
98
+ - random_seed: 42
99
+ - gradient_accumulation_steps: 4
100
+ - weight_decay: 1e-07
101
+ - lr_warmup_step_ratio: 0.1
102
+ - max_grad_norm: 10.0
103
+
104
+ The full configuration can be found at [fine-tuning parameter file](https://huggingface.co/tner/bertweet-large-wnut2017/raw/main/trainer_config.json).
105
+
106
+ ### Reference
107
+ If you use any resource from T-NER, please consider to cite our [paper](https://aclanthology.org/2021.eacl-demos.7/).
108
+
109
+ ```
110
+
111
+ @inproceedings{ushio-camacho-collados-2021-ner,
112
+ title = "{T}-{NER}: An All-Round Python Library for Transformer-based Named Entity Recognition",
113
+ author = "Ushio, Asahi and
114
+ Camacho-Collados, Jose",
115
+ booktitle = "Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations",
116
+ month = apr,
117
+ year = "2021",
118
+ address = "Online",
119
+ publisher = "Association for Computational Linguistics",
120
+ url = "https://aclanthology.org/2021.eacl-demos.7",
121
+ doi = "10.18653/v1/2021.eacl-demos.7",
122
+ pages = "53--62",
123
+ 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.",
124
+ }
125
+
126
+ ```
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "tner_ckpt/wnut2017_bertweet_large/best_model",
3
  "architectures": [
4
  "RobertaForTokenClassification"
5
  ],
 
1
  {
2
+ "_name_or_path": "tner_ckpt/wnut2017_bertweet_large/model_ulfllg/epoch_5",
3
  "architectures": [
4
  "RobertaForTokenClassification"
5
  ],
eval/metric.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.5302273987798114, "micro/f1_ci": {"90": [0.5002577319587629, 0.5587481638299118], "95": [0.4947163587619384, 0.5629013150503995]}, "micro/recall": 0.44300278035217794, "micro/precision": 0.6602209944751382, "macro/f1": 0.4643459997680019, "macro/f1_ci": {"90": [0.4295294813187177, 0.49516911094489413], "95": [0.42541205920185476, 0.5012597092323381]}, "macro/recall": 0.3973128655628379, "macro/precision": 0.5792841925426832, "per_entity_metric": {"corporation": {"f1": 0.3902439024390244, "f1_ci": {"90": [0.28251334858886346, 0.4844618055555554], "95": [0.2615622052645115, 0.5000766871165647]}, "precision": 0.42105263157894735, "recall": 0.36363636363636365}, "group": {"f1": 0.37130801687763715, "f1_ci": {"90": [0.28571428571428575, 0.4476021935286534], "95": [0.2649412628487518, 0.45962356792144043]}, "precision": 0.6111111111111112, "recall": 0.26666666666666666}, "location": {"f1": 0.6595744680851063, "f1_ci": {"90": [0.5980565014653362, 0.7165448388917255], "95": [0.5819641909031913, 0.7272881880024737]}, "precision": 0.7045454545454546, "recall": 0.62}, "person": {"f1": 0.65474552957359, "f1_ci": {"90": [0.6147118506493507, 0.6900943074573127], "95": [0.6088246972404209, 0.6951931075460488]}, "precision": 0.7986577181208053, "recall": 0.5547785547785548}, "product": {"f1": 0.2857142857142857, "f1_ci": {"90": [0.21047120418848164, 0.35790123456790124], "95": [0.19321348940914154, 0.3714393395549175]}, "precision": 0.43548387096774194, "recall": 0.2125984251968504}, "work_of_art": {"f1": 0.4244897959183674, "f1_ci": {"90": [0.3478106691335183, 0.4930296272698311], "95": [0.33599726775956273, 0.5040740341031729]}, "precision": 0.5048543689320388, "recall": 0.36619718309859156}}}
eval/metric_span.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.6142697881828317, "micro/f1_ci": {"90": [0.5873941890739028, 0.6394992474386686], "95": [0.5823018215160319, 0.644268545034642]}, "micro/recall": 0.5106580166821131, "micro/precision": 0.7706293706293706, "macro/f1": 0.6142697881828317, "macro/f1_ci": {"90": [0.5873941890739028, 0.6394992474386686], "95": [0.5823018215160319, 0.644268545034642]}, "macro/recall": 0.5106580166821131, "macro/precision": 0.7706293706293706}
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:b9c7ea68f78bfe5749358d2baf619cb36d1576a59e8726fc6a298dd1cf18152a
3
- size 1417424945
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85e8975cb8f6540f800966f5cda1b8575f68e3b57dac340b473111b76a07f784
3
+ size 1417430385
tokenizer_config.json CHANGED
@@ -5,7 +5,7 @@
5
  "eos_token": "</s>",
6
  "errors": "replace",
7
  "mask_token": "<mask>",
8
- "name_or_path": "tner_ckpt/wnut2017_bertweet_large/best_model",
9
  "pad_token": "<pad>",
10
  "sep_token": "</s>",
11
  "special_tokens_map_file": "tner_ckpt/wnut2017_bertweet_large/model_ulfllg/epoch_5/special_tokens_map.json",
 
5
  "eos_token": "</s>",
6
  "errors": "replace",
7
  "mask_token": "<mask>",
8
+ "name_or_path": "tner_ckpt/wnut2017_bertweet_large/model_ulfllg/epoch_5",
9
  "pad_token": "<pad>",
10
  "sep_token": "</s>",
11
  "special_tokens_map_file": "tner_ckpt/wnut2017_bertweet_large/model_ulfllg/epoch_5/special_tokens_map.json",
trainer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"dataset": ["tner/wnut2017"], "dataset_split": "train", "dataset_name": null, "local_dataset": null, "model": "vinai/bertweet-large", "crf": false, "max_length": 128, "epoch": 15, "batch_size": 16, "lr": 1e-05, "random_seed": 42, "gradient_accumulation_steps": 4, "weight_decay": 1e-07, "lr_warmup_step_ratio": 0.1, "max_grad_norm": 10.0}