asahi417 commited on
Commit
9c6a4de
1 Parent(s): b46b80b

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/deberta-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.5105386416861827
22
+ - name: Precision
23
+ type: precision
24
+ value: 0.6931637519872814
25
+ - name: Recall
26
+ type: recall
27
+ value: 0.4040778498609824
28
+ - name: F1 (macro)
29
+ type: f1_macro
30
+ value: 0.4263428845085451
31
+ - name: Precision (macro)
32
+ type: precision_macro
33
+ value: 0.6003185137596864
34
+ - name: Recall (macro)
35
+ type: recall_macro
36
+ value: 0.35195768262641947
37
+ - name: F1 (entity span)
38
+ type: f1_entity_span
39
+ value: 0.5936768149882904
40
+ - name: Precision (entity span)
41
+ type: precision_entity_span
42
+ value: 0.8060413354531002
43
+ - name: Recall (entity span)
44
+ type: recall_entity_span
45
+ value: 0.46987951807228917
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/deberta-large-wnut2017
53
+
54
+ This model is a fine-tuned version of [microsoft/deberta-large](https://huggingface.co/microsoft/deberta-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.5105386416861827
59
+ - Precision (micro): 0.6931637519872814
60
+ - Recall (micro): 0.4040778498609824
61
+ - F1 (macro): 0.4263428845085451
62
+ - Precision (macro): 0.6003185137596864
63
+ - Recall (macro): 0.35195768262641947
64
+
65
+ The per-entity breakdown of the F1 score on the test set are below:
66
+ - corporation: 0.3503649635036496
67
+ - group: 0.3148148148148148
68
+ - location: 0.6029411764705882
69
+ - person: 0.6628895184135977
70
+ - product: 0.1951219512195122
71
+ - work_of_art: 0.431924882629108
72
+
73
+ For F1 scores, the confidence interval is obtained by bootstrap as below:
74
+ - F1 (micro):
75
+ - 90%: [0.47970650356554456, 0.5385161869734422]
76
+ - 95%: [0.47475901512925966, 0.5430870496346687]
77
+ - F1 (macro):
78
+ - 90%: [0.47970650356554456, 0.5385161869734422]
79
+ - 95%: [0.47475901512925966, 0.5430870496346687]
80
+
81
+ Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/deberta-large-wnut2017/raw/main/eval/metric.json)
82
+ and [metric file of entity span](https://huggingface.co/tner/deberta-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: microsoft/deberta-large
93
+ - crf: True
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/deberta-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_deberta_large/best_model",
3
  "architectures": [
4
  "DebertaForTokenClassification"
5
  ],
 
1
  {
2
+ "_name_or_path": "tner_ckpt/wnut2017_deberta_large_v1/model_ayzfwn/epoch_5",
3
  "architectures": [
4
  "DebertaForTokenClassification"
5
  ],
eval/metric.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.5105386416861827, "micro/f1_ci": {"90": [0.47970650356554456, 0.5385161869734422], "95": [0.47475901512925966, 0.5430870496346687]}, "micro/recall": 0.4040778498609824, "micro/precision": 0.6931637519872814, "macro/f1": 0.4263428845085451, "macro/f1_ci": {"90": [0.39426591884558804, 0.4545712655238229], "95": [0.38807589943775705, 0.4599705771824737]}, "macro/recall": 0.35195768262641947, "macro/precision": 0.6003185137596864, "per_entity_metric": {"corporation": {"f1": 0.3503649635036496, "f1_ci": {"90": [0.25, 0.44004724409448814], "95": [0.23425332991803258, 0.4615702479338844]}, "precision": 0.3380281690140845, "recall": 0.36363636363636365}, "group": {"f1": 0.3148148148148148, "f1_ci": {"90": [0.2272727272727273, 0.39614832223527874], "95": [0.21596110755441741, 0.4055479550691245]}, "precision": 0.6666666666666666, "recall": 0.20606060606060606}, "location": {"f1": 0.6029411764705882, "f1_ci": {"90": [0.535979661016949, 0.6666666666666665], "95": [0.5179212561518631, 0.6752398081534774]}, "precision": 0.6721311475409836, "recall": 0.5466666666666666}, "person": {"f1": 0.6628895184135977, "f1_ci": {"90": [0.6241108987808454, 0.6986254012381062], "95": [0.6153846153846154, 0.7045139877293182]}, "precision": 0.8447653429602888, "recall": 0.5454545454545454}, "product": {"f1": 0.1951219512195122, "f1_ci": {"90": [0.12413793103448277, 0.26666666666666666], "95": [0.11031844733371016, 0.28111927144535853]}, "precision": 0.43243243243243246, "recall": 0.12598425196850394}, "work_of_art": {"f1": 0.431924882629108, "f1_ci": {"90": [0.3571260898725687, 0.5065021645021645], "95": [0.34593366093366096, 0.5167490995107791]}, "precision": 0.647887323943662, "recall": 0.323943661971831}}}
eval/metric_span.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.5936768149882904, "micro/f1_ci": {"90": [0.5661684827134196, 0.6210986510760949], "95": [0.5605935659555948, 0.6248693729903536]}, "micro/recall": 0.46987951807228917, "micro/precision": 0.8060413354531002, "macro/f1": 0.5936768149882904, "macro/f1_ci": {"90": [0.5661684827134196, 0.6210986510760949], "95": [0.5605935659555948, 0.6248693729903536]}, "macro/recall": 0.46987951807228917, "macro/precision": 0.8060413354531002}
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:34c3badba8b88657cab3d60a67e0bc7e0253de374586436f11839e5bfcff6d56
3
- size 1620836275
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ef61217f4af95ab9b1640b0af9790ebc770bb933e5ebab187f2120e711e33d1
3
+ size 1620841715
tokenizer_config.json CHANGED
@@ -36,7 +36,7 @@
36
  "single_word": false
37
  },
38
  "model_max_length": 512,
39
- "name_or_path": "tner_ckpt/wnut2017_deberta_large/best_model",
40
  "pad_token": {
41
  "__type": "AddedToken",
42
  "content": "[PAD]",
 
36
  "single_word": false
37
  },
38
  "model_max_length": 512,
39
+ "name_or_path": "tner_ckpt/wnut2017_deberta_large_v1/model_ayzfwn/epoch_5",
40
  "pad_token": {
41
  "__type": "AddedToken",
42
  "content": "[PAD]",
trainer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"dataset": ["tner/wnut2017"], "dataset_split": "train", "dataset_name": null, "local_dataset": null, "model": "microsoft/deberta-large", "crf": true, "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}