model update
Browse files- README.md +122 -0
- config.json +1 -1
- eval/metric.json +1 -0
- eval/metric_span.json +1 -0
- eval/prediction.validation.json +0 -0
- pytorch_model.bin +2 -2
- tokenizer_config.json +1 -1
- trainer_config.json +1 -0
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/deberta-v3-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.8902493653874869
|
22 |
+
- name: Precision
|
23 |
+
type: precision
|
24 |
+
value: 0.8697724178175452
|
25 |
+
- name: Recall
|
26 |
+
type: recall
|
27 |
+
value: 0.9117137322866755
|
28 |
+
- name: F1 (macro)
|
29 |
+
type: f1_macro
|
30 |
+
value: 0.8863403908610603
|
31 |
+
- name: Precision (macro)
|
32 |
+
type: precision_macro
|
33 |
+
value: 0.8657302393432342
|
34 |
+
- name: Recall (macro)
|
35 |
+
type: recall_macro
|
36 |
+
value: 0.9080747413030301
|
37 |
+
- name: F1 (entity span)
|
38 |
+
type: f1_entity_span
|
39 |
+
value: 0.8929371360310587
|
40 |
+
- name: Precision (entity span)
|
41 |
+
type: precision_entity_span
|
42 |
+
value: 0.8723983660766388
|
43 |
+
- name: Recall (entity span)
|
44 |
+
type: recall_entity_span
|
45 |
+
value: 0.9144663064532572
|
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-v3-large-bc5cdr
|
53 |
+
|
54 |
+
This model is a fine-tuned version of [microsoft/deberta-v3-large](https://huggingface.co/microsoft/deberta-v3-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.8902493653874869
|
59 |
+
- Precision (micro): 0.8697724178175452
|
60 |
+
- Recall (micro): 0.9117137322866755
|
61 |
+
- F1 (macro): 0.8863403908610603
|
62 |
+
- Precision (macro): 0.8657302393432342
|
63 |
+
- Recall (macro): 0.9080747413030301
|
64 |
+
|
65 |
+
The per-entity breakdown of the F1 score on the test set are below:
|
66 |
+
- chemical: 0.9298502009499452
|
67 |
+
- disease: 0.8428305807721753
|
68 |
+
|
69 |
+
For F1 scores, the confidence interval is obtained by bootstrap as below:
|
70 |
+
- F1 (micro):
|
71 |
+
- 90%: [0.885162383660078, 0.8951239957151518]
|
72 |
+
- 95%: [0.8838793313408008, 0.8959517574197015]
|
73 |
+
- F1 (macro):
|
74 |
+
- 90%: [0.885162383660078, 0.8951239957151518]
|
75 |
+
- 95%: [0.8838793313408008, 0.8959517574197015]
|
76 |
+
|
77 |
+
Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/deberta-v3-large-bc5cdr/raw/main/eval/metric.json)
|
78 |
+
and [metric file of entity span](https://huggingface.co/tner/deberta-v3-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: microsoft/deberta-v3-large
|
89 |
+
- crf: True
|
90 |
+
- max_length: 128
|
91 |
+
- epoch: 15
|
92 |
+
- batch_size: 16
|
93 |
+
- lr: 1e-05
|
94 |
+
- random_seed: 42
|
95 |
+
- gradient_accumulation_steps: 4
|
96 |
+
- weight_decay: 1e-07
|
97 |
+
- lr_warmup_step_ratio: 0.1
|
98 |
+
- max_grad_norm: None
|
99 |
+
|
100 |
+
The full configuration can be found at [fine-tuning parameter file](https://huggingface.co/tner/deberta-v3-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/
|
3 |
"architectures": [
|
4 |
"DebertaV2ForTokenClassification"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "tner_ckpt/bc5cdr_deberta_large/model_rgwuwr/epoch_5",
|
3 |
"architectures": [
|
4 |
"DebertaV2ForTokenClassification"
|
5 |
],
|
eval/metric.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"micro/f1": 0.8902493653874869, "micro/f1_ci": {"90": [0.885162383660078, 0.8951239957151518], "95": [0.8838793313408008, 0.8959517574197015]}, "micro/recall": 0.9117137322866755, "micro/precision": 0.8697724178175452, "macro/f1": 0.8863403908610603, "macro/f1_ci": {"90": [0.8811004739263217, 0.8914186170057118], "95": [0.8799998974087929, 0.8921780784816905]}, "macro/recall": 0.9080747413030301, "macro/precision": 0.8657302393432342, "per_entity_metric": {"chemical": {"f1": 0.9298502009499452, "f1_ci": {"90": [0.9248183132385925, 0.9347984838913667], "95": [0.9240282546607785, 0.9357697901181058]}, "precision": 0.9149739349271976, "recall": 0.9452181987000928}, "disease": {"f1": 0.8428305807721753, "f1_ci": {"90": [0.8337110247777506, 0.8512171182854413], "95": [0.8319540592803863, 0.8529680090572098]}, "precision": 0.816486543759271, "recall": 0.8709312839059674}}}
|
eval/metric_span.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"micro/f1": 0.8929371360310587, "micro/f1_ci": {"90": [0.8879351802324504, 0.8977068245813511], "95": [0.886871208477677, 0.8984731182484651]}, "micro/recall": 0.9144663064532572, "micro/precision": 0.8723983660766388, "macro/f1": 0.8929371360310587, "macro/f1_ci": {"90": [0.8879351802324504, 0.8977068245813511], "95": [0.886871208477677, 0.8984731182484651]}, "macro/recall": 0.9144663064532572, "macro/precision": 0.8723983660766388}
|
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:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5fc7547eccd625261acc96bafe85b803440e4c400c8976e10a6ead823d5a4819
|
3 |
+
size 1736206639
|
tokenizer_config.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
"do_lower_case": false,
|
5 |
"eos_token": "[SEP]",
|
6 |
"mask_token": "[MASK]",
|
7 |
-
"name_or_path": "tner_ckpt/
|
8 |
"pad_token": "[PAD]",
|
9 |
"sep_token": "[SEP]",
|
10 |
"sp_model_kwargs": {},
|
|
|
4 |
"do_lower_case": false,
|
5 |
"eos_token": "[SEP]",
|
6 |
"mask_token": "[MASK]",
|
7 |
+
"name_or_path": "tner_ckpt/bc5cdr_deberta_large/model_rgwuwr/epoch_5",
|
8 |
"pad_token": "[PAD]",
|
9 |
"sep_token": "[SEP]",
|
10 |
"sp_model_kwargs": {},
|
trainer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"dataset": ["tner/bc5cdr"], "dataset_split": "train", "dataset_name": null, "local_dataset": null, "model": "microsoft/deberta-v3-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": null}
|