File size: 2,053 Bytes
f9c91de
 
 
 
 
 
 
 
 
 
 
 
 
6c03063
ad4a924
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6c03063
ad4a924
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ea14799
 
 
ad4a924
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
license: apache-2.0
language:
- en
metrics:
- accuracy
- f1
- recall
- precision
base_model:
- dslim/distilbert-NER
pipeline_tag: token-classification
---
Ir is fine-tuned [DistilBERT-NER](https://huggingface.co/dslim/distilbert-NER) model with the classifier replaced to increase the number of classes from 9 to 11. Two additional classes is I-MOU and B-MOU what stands for mountine.
Inital new classifier inherited all weights and biases from original and add new beurons wirh weights initialized wirh xavier_uniform_

#### How to use

This model can be utilized with the Transformers *pipeline* for NER, similar to the BERT models.

```python
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("dimanoid12331/distilbert-NER_finetuned_on_mountines")
model = AutoModelForTokenClassification.from_pretrained("dimanoid12331/distilbert-NER_finetuned_on_mountines")
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = "My name is Wolfgang and I live in Berlin"
ner_results = nlp(example)
print(ner_results)
```



## Training data

This model was fine-tuned on English castom arteficial dataset with sentances wich contains mountains. 

As in the dataset, each token will be classified as one of the following classes:

Abbreviation|Description
-|-
O|Outside of a named entity
B-MISC |Beginning of a miscellaneous entity right after another miscellaneous entity
I-MISC | Miscellaneous entity
B-PER |Beginning of a person’s name right after another person’s name
I-PER |Person’s name
B-ORG |Beginning of an organization right after another organization
I-ORG |organization
B-LOC |Beginning of a location right after another location
I-LOC |Location
B-MOU |Beginning of a Mountain right after another Mountain
I-MOU |Mountain

Sentences |Tokens
-|-
216 |2783


## Eval results
| Metric     | Score |
|------------|-------|
| Loss       | 0.2035|
| Precision  | 0.8536|
| Recall     | 0.7906|
| F1         | 0.7117|
| Accuracy   | 0.7906|