philschmid's picture
philschmid
HF staff
Update README.md cc95e1a
1
---
2
license: apache-2.0
3
tags:
4
- token-classification
5
datasets:
6
- wikiann-conll2003
7
metrics:
8
- precision
9
- recall
10
- f1
11
- accuracy
12
13
model-index:
14
- name: distilroberta-base-ner-wikiann-conll2003-3-class
15
  results:
16
  - task:
17
      name: Token Classification
18
      type: token-classification
19
    dataset:
20
      name: wikiann-conll2003
21
      type: wikiann-conll2003
22
    metrics:
23
      - name: Precision
24
        type: precision
25
        value: 0.9624757386241104
26
      - name: Recall
27
        type: recall
28
        value: 0.9667497021553124
29
      - name: F1
30
        type: f1
31
        value: 0.964607986167396
32
      - name: Accuracy
33
        type: accuracy
34
        value: 0.9913626461292995
35
---
36
37
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
38
should probably proofread and complete it, then remove this comment. -->
39
40
# distilroberta-base-ner-wikiann-conll2003-3-class
41
42
This model is a fine-tuned version of [distilroberta-base](https://huggingface.co/distilroberta-base) on the wikiann and conll2003 dataset. It consists out of the classes of wikiann. 
43
44
O (0), B-PER (1), I-PER (2), B-ORG (3), I-ORG (4) B-LOC (5), I-LOC (6).
45
46
eval F1-Score: **96,25** (merged dataset)   
47
test F1-Score: **92,41** (merged dataset) 
48
49
50
51
## Model Usage
52
53
```python
54
from transformers import AutoTokenizer, AutoModelForTokenClassification
55
from transformers import pipeline
56
57
tokenizer = AutoTokenizer.from_pretrained("philschmid/distilroberta-base-ner-wikiann-conll2003-3-class")
58
model = AutoModelForTokenClassification.from_pretrained("philschmid/distilroberta-base-ner-wikiann-conll2003-3-class")
59
60
nlp = pipeline("ner", model=model, tokenizer=tokenizer, grouped_entities=True)
61
example = "My name is Philipp and live in Germany"
62
63
nlp(example)
64
65
```
66
67
## Training procedure
68
69
### Training hyperparameters
70
71
The following hyperparameters were used during training:
72
- learning_rate: 4.9086903597787154e-05
73
- train_batch_size: 32
74
- eval_batch_size: 16
75
- seed: 42
76
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
77
- lr_scheduler_type: linear
78
- num_epochs: 5.0
79
- mixed_precision_training: Native AMP
80
81
### Training results
82
83
It achieves the following results on the evaluation set:
84
- Loss: 0.0520
85
- Precision: 0.9625
86
- Recall: 0.9667
87
- F1: 0.9646
88
- Accuracy: 0.9914
89
90
It achieves the following results on the test set:
91
- Loss: 0.141
92
- Precision: 0.917
93
- Recall: 0.9313
94
- F1: 0.9241
95
- Accuracy: 0.9807
96
97
98
### Framework versions
99
100
- Transformers 4.6.1
101
- Pytorch 1.8.1+cu101
102
- Datasets 1.6.2
103
- Tokenizers 0.10.3
104