asahi417 commited on
Commit
5b56490
1 Parent(s): 7314ba3

model update

Browse files
README.md ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - bc5cdr
4
+ metrics:
5
+ - f1
6
+ - precision
7
+ - recall
8
+ model-index:
9
+ - name: tner/roberta-large-bc5cdr
10
+ results:
11
+ - task:
12
+ name: Token Classification
13
+ type: token-classification
14
+ dataset:
15
+ name: bc5cdr
16
+ type: bc5cdr
17
+ args: bc5cdr
18
+ metrics:
19
+ - name: F1
20
+ type: f1
21
+ value: 0.8840696387239609
22
+ - name: Precision
23
+ type: precision
24
+ value: 0.8728266269249876
25
+ - name: Recall
26
+ type: recall
27
+ value: 0.8956060760526048
28
+ - name: F1 (macro)
29
+ type: f1_macro
30
+ value: 0.8797360472482783
31
+ - name: Precision (macro)
32
+ type: precision_macro
33
+ value: 0.8684274142690976
34
+ - name: Recall (macro)
35
+ type: recall_macro
36
+ value: 0.8913672531528037
37
+ - name: F1 (entity span)
38
+ type: f1_entity_span
39
+ value: 0.886283586595552
40
+ - name: Precision (entity span)
41
+ type: precision_entity_span
42
+ value: 0.8750124192747144
43
+ - name: Recall (entity span)
44
+ type: recall_entity_span
45
+ value: 0.8978489142624121
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-bc5cdr
53
+
54
+ This model is a fine-tuned version of [roberta-large](https://huggingface.co/roberta-large) on the
55
+ [tner/bc5cdr](https://huggingface.co/datasets/tner/bc5cdr) 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.8840696387239609
59
+ - Precision (micro): 0.8728266269249876
60
+ - Recall (micro): 0.8956060760526048
61
+ - F1 (macro): 0.8797360472482783
62
+ - Precision (macro): 0.8684274142690976
63
+ - Recall (macro): 0.8913672531528037
64
+
65
+ The per-entity breakdown of the F1 score on the test set are below:
66
+ - chemical: 0.9256943167187788
67
+ - disease: 0.8337777777777777
68
+
69
+ For F1 scores, the confidence interval is obtained by bootstrap as below:
70
+ - F1 (micro):
71
+ - 90%: [0.878869501707946, 0.8890795634554179]
72
+ - 95%: [0.8776790106527211, 0.8897422640465147]
73
+ - F1 (macro):
74
+ - 90%: [0.878869501707946, 0.8890795634554179]
75
+ - 95%: [0.8776790106527211, 0.8897422640465147]
76
+
77
+ Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/roberta-large-bc5cdr/raw/main/eval/metric.json)
78
+ and [metric file of entity span](https://huggingface.co/tner/roberta-large-bc5cdr/raw/main/eval/metric_span.json).
79
+
80
+
81
+ ### Training hyperparameters
82
+
83
+ The following hyperparameters were used during training:
84
+ - dataset: ['tner/bc5cdr']
85
+ - dataset_split: train
86
+ - dataset_name: None
87
+ - local_dataset: None
88
+ - model: roberta-large
89
+ - crf: True
90
+ - max_length: 128
91
+ - epoch: 15
92
+ - batch_size: 64
93
+ - lr: 1e-05
94
+ - random_seed: 42
95
+ - gradient_accumulation_steps: 1
96
+ - weight_decay: None
97
+ - lr_warmup_step_ratio: 0.1
98
+ - max_grad_norm: 10.0
99
+
100
+ The full configuration can be found at [fine-tuning parameter file](https://huggingface.co/tner/roberta-large-bc5cdr/raw/main/trainer_config.json).
101
+
102
+ ### Reference
103
+ If you use any resource from T-NER, please consider to cite our [paper](https://aclanthology.org/2021.eacl-demos.7/).
104
+
105
+ ```
106
+
107
+ @inproceedings{ushio-camacho-collados-2021-ner,
108
+ title = "{T}-{NER}: An All-Round Python Library for Transformer-based Named Entity Recognition",
109
+ author = "Ushio, Asahi and
110
+ Camacho-Collados, Jose",
111
+ booktitle = "Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations",
112
+ month = apr,
113
+ year = "2021",
114
+ address = "Online",
115
+ publisher = "Association for Computational Linguistics",
116
+ url = "https://aclanthology.org/2021.eacl-demos.7",
117
+ doi = "10.18653/v1/2021.eacl-demos.7",
118
+ pages = "53--62",
119
+ 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.",
120
+ }
121
+
122
+ ```
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "tner_ckpt/bc5cdr_roberta_large/best_model",
3
  "architectures": [
4
  "RobertaForTokenClassification"
5
  ],
 
1
  {
2
+ "_name_or_path": "tner_ckpt/bc5cdr_roberta_large/model_rcsnba/epoch_5",
3
  "architectures": [
4
  "RobertaForTokenClassification"
5
  ],
eval/metric.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.8840696387239609, "micro/f1_ci": {"90": [0.878869501707946, 0.8890795634554179], "95": [0.8776790106527211, 0.8897422640465147]}, "micro/recall": 0.8956060760526048, "micro/precision": 0.8728266269249876, "macro/f1": 0.8797360472482783, "macro/f1_ci": {"90": [0.8744144067750624, 0.8846695860165229], "95": [0.8730734458935475, 0.8856738218616871]}, "macro/recall": 0.8913672531528037, "macro/precision": 0.8684274142690976, "per_entity_metric": {"chemical": {"f1": 0.9256943167187788, "f1_ci": {"90": [0.9200418390493498, 0.9307510614798177], "95": [0.9189182982927817, 0.9314566083883723]}, "precision": 0.9169247586081254, "recall": 0.9346332404828227}, "disease": {"f1": 0.8337777777777777, "f1_ci": {"90": [0.8248297919157508, 0.8425488073476383], "95": [0.8227259027600149, 0.8437044280627852]}, "precision": 0.8199300699300699, "recall": 0.8481012658227848}}}
eval/metric_span.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"micro/f1": 0.886283586595552, "micro/f1_ci": {"90": [0.8813621339936485, 0.8911917188865727], "95": [0.88005486654077, 0.891949014446057]}, "micro/recall": 0.8978489142624121, "micro/precision": 0.8750124192747144, "macro/f1": 0.886283586595552, "macro/f1_ci": {"90": [0.8813621339936485, 0.8911917188865727], "95": [0.88005486654077, 0.891949014446057]}, "macro/recall": 0.8978489142624121, "macro/precision": 0.8750124192747144}
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:99a9fd565e76d1775117d515580168d79cac62b61740feb840c1211233a02b33
3
- size 1417392177
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2f0359dee17dd9b432e06c7e3d10636daa1b8e234f563271ded7b732fe55330
3
+ size 1417397617
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/bc5cdr_roberta_large/best_model",
10
  "pad_token": "<pad>",
11
  "sep_token": "</s>",
12
  "special_tokens_map_file": "tner_ckpt/bc5cdr_roberta_large/model_rcsnba/epoch_5/special_tokens_map.json",
 
6
  "errors": "replace",
7
  "mask_token": "<mask>",
8
  "model_max_length": 512,
9
+ "name_or_path": "tner_ckpt/bc5cdr_roberta_large/model_rcsnba/epoch_5",
10
  "pad_token": "<pad>",
11
  "sep_token": "</s>",
12
  "special_tokens_map_file": "tner_ckpt/bc5cdr_roberta_large/model_rcsnba/epoch_5/special_tokens_map.json",
trainer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"dataset": ["tner/bc5cdr"], "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": 1, "weight_decay": null, "lr_warmup_step_ratio": 0.1, "max_grad_norm": 10.0}