asahi417 commited on
Commit
ec75bd3
·
1 Parent(s): b5f09cf

model update

Browse files
README.md ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - btc
4
+ metrics:
5
+ - f1
6
+ - precision
7
+ - recall
8
+ model-index:
9
+ - name: tner/roberta-large-btc
10
+ results:
11
+ - task:
12
+ name: Token Classification
13
+ type: token-classification
14
+ dataset:
15
+ name: btc
16
+ type: btc
17
+ args: btc
18
+ metrics:
19
+ - name: F1
20
+ type: f1
21
+ value: 0.8367557645979121
22
+ - name: Precision
23
+ type: precision
24
+ value: 0.8401290025339784
25
+ - name: Recall
26
+ type: recall
27
+ value: 0.8334095063985375
28
+ - name: F1 (macro)
29
+ type: f1_macro
30
+ value: 0.7830389304099722
31
+ - name: Precision (macro)
32
+ type: precision_macro
33
+ value: 0.7911560677795398
34
+ - name: Recall (macro)
35
+ type: recall_macro
36
+ value: 0.7756024849498971
37
+ - name: F1 (entity span)
38
+ type: f1_entity_span
39
+ value: 0.9113227027647126
40
+ - name: Precision (entity span)
41
+ type: precision_entity_span
42
+ value: 0.9149965445749827
43
+ - name: Recall (entity span)
44
+ type: recall_entity_span
45
+ value: 0.9076782449725777
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-btc
53
+
54
+ This model is a fine-tuned version of [roberta-large](https://huggingface.co/roberta-large) on the
55
+ [tner/btc](https://huggingface.co/datasets/tner/btc) 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.8367557645979121
59
+ - Precision (micro): 0.8401290025339784
60
+ - Recall (micro): 0.8334095063985375
61
+ - F1 (macro): 0.7830389304099722
62
+ - Precision (macro): 0.7911560677795398
63
+ - Recall (macro): 0.7756024849498971
64
+
65
+ The per-entity breakdown of the F1 score on the test set are below:
66
+ - location: 0.736756316218419
67
+ - organization: 0.6927985414767548
68
+ - person: 0.9195619335347431
69
+
70
+ For F1 scores, the confidence interval is obtained by bootstrap as below:
71
+ - F1 (micro):
72
+ - 90%: [0.8263755823738717, 0.8472678708881698]
73
+ - 95%: [0.8238362631404713, 0.8498613485265176]
74
+ - F1 (macro):
75
+ - 90%: [0.8263755823738717, 0.8472678708881698]
76
+ - 95%: [0.8238362631404713, 0.8498613485265176]
77
+
78
+ Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/roberta-large-btc/raw/main/eval/metric.json)
79
+ and [metric file of entity span](https://huggingface.co/tner/roberta-large-btc/raw/main/eval/metric_span.json).
80
+
81
+
82
+ ### Training hyperparameters
83
+
84
+ The following hyperparameters were used during training:
85
+ - dataset: ['tner/btc']
86
+ - dataset_split: train
87
+ - dataset_name: None
88
+ - local_dataset: None
89
+ - model: roberta-large
90
+ - crf: True
91
+ - max_length: 128
92
+ - epoch: 15
93
+ - batch_size: 64
94
+ - lr: 1e-05
95
+ - random_seed: 42
96
+ - gradient_accumulation_steps: 2
97
+ - weight_decay: 1e-07
98
+ - lr_warmup_step_ratio: 0.1
99
+ - max_grad_norm: None
100
+
101
+ The full configuration can be found at [fine-tuning parameter file](https://huggingface.co/tner/roberta-large-btc/raw/main/trainer_config.json).
102
+
103
+ ### Reference
104
+ If you use any resource from T-NER, please consider to cite our [paper](https://aclanthology.org/2021.eacl-demos.7/).
105
+
106
+ ```
107
+
108
+ @inproceedings{ushio-camacho-collados-2021-ner,
109
+ title = "{T}-{NER}: An All-Round Python Library for Transformer-based Named Entity Recognition",
110
+ author = "Ushio, Asahi and
111
+ Camacho-Collados, Jose",
112
+ booktitle = "Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations",
113
+ month = apr,
114
+ year = "2021",
115
+ address = "Online",
116
+ publisher = "Association for Computational Linguistics",
117
+ url = "https://aclanthology.org/2021.eacl-demos.7",
118
+ doi = "10.18653/v1/2021.eacl-demos.7",
119
+ pages = "53--62",
120
+ 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.",
121
+ }
122
+
123
+ ```
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "tner_ckpt/btc_roberta_large/best_model",
3
  "architectures": [
4
  "RobertaForTokenClassification"
5
  ],
 
1
  {
2
+ "_name_or_path": "tner_ckpt/btc_roberta_large/model_cghqta/epoch_5",
3
  "architectures": [
4
  "RobertaForTokenClassification"
5
  ],
eval/metric.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.8367557645979121, "micro/f1_ci": {"90": [0.8263755823738717, 0.8472678708881698], "95": [0.8238362631404713, 0.8498613485265176]}, "micro/recall": 0.8334095063985375, "micro/precision": 0.8401290025339784, "macro/f1": 0.7830389304099722, "macro/f1_ci": {"90": [0.7696091150716922, 0.7967192841541696], "95": [0.7660108860238721, 0.7998833434490498]}, "macro/recall": 0.7756024849498971, "macro/precision": 0.7911560677795398, "per_entity_metric": {"location": {"f1": 0.736756316218419, "f1_ci": {"90": [0.7113860430705887, 0.7627252046055419], "95": [0.7051230501472048, 0.7673361281231106]}, "precision": 0.7648054145516074, "recall": 0.710691823899371}, "organization": {"f1": 0.6927985414767548, "f1_ci": {"90": [0.6678631913277484, 0.716819379942262], "95": [0.6645546888239872, 0.7213803488241352]}, "precision": 0.6884057971014492, "recall": 0.6972477064220184}, "person": {"f1": 0.9195619335347431, "f1_ci": {"90": [0.9104693517194988, 0.9284883241222021], "95": [0.9089856318984997, 0.9301216516668346]}, "precision": 0.9202569916855631, "recall": 0.9188679245283019}}}
eval/metric_span.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.9113227027647126, "micro/f1_ci": {"90": [0.9044179638988344, 0.9176975890486316], "95": [0.902687742764797, 0.9191195236935528]}, "micro/recall": 0.9076782449725777, "micro/precision": 0.9149965445749827, "macro/f1": 0.9113227027647126, "macro/f1_ci": {"90": [0.9044179638988344, 0.9176975890486316], "95": [0.902687742764797, 0.9191195236935528]}, "macro/recall": 0.9076782449725777, "macro/precision": 0.9149965445749827}
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:7d09155c297e6c1193d96398366bb54cbc734f09ea44c80aad6e320840c37409
3
- size 1417400369
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:065f2a6482fdb2615f5ca0f25c077ba12328882aba50137814b2aec25f5eab4c
3
+ size 1417405809
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/btc_roberta_large/best_model",
10
  "pad_token": "<pad>",
11
  "sep_token": "</s>",
12
  "special_tokens_map_file": "tner_ckpt/btc_roberta_large/model_cghqta/epoch_5/special_tokens_map.json",
 
6
  "errors": "replace",
7
  "mask_token": "<mask>",
8
  "model_max_length": 512,
9
+ "name_or_path": "tner_ckpt/btc_roberta_large/model_cghqta/epoch_5",
10
  "pad_token": "<pad>",
11
  "sep_token": "</s>",
12
  "special_tokens_map_file": "tner_ckpt/btc_roberta_large/model_cghqta/epoch_5/special_tokens_map.json",
trainer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"dataset": ["tner/btc"], "dataset_split": "train", "dataset_name": null, "local_dataset": null, "model": "roberta-large", "crf": true, "max_length": 128, "epoch": 15, "batch_size": 64, "lr": 1e-05, "random_seed": 42, "gradient_accumulation_steps": 2, "weight_decay": 1e-07, "lr_warmup_step_ratio": 0.1, "max_grad_norm": null}