Update README.md
Browse files
README.md
CHANGED
@@ -7,7 +7,7 @@ metrics:
|
|
7 |
- f1
|
8 |
- accuracy
|
9 |
model-index:
|
10 |
-
- name: distilbert-
|
11 |
results: []
|
12 |
datasets:
|
13 |
- conll2003
|
@@ -20,7 +20,7 @@ pipeline_tag: token-classification
|
|
20 |
|
21 |
## Model description
|
22 |
|
23 |
-
**distilbert-
|
24 |
|
25 |
This model accurately identifies the same four types of entities as its BERT counterparts: location (LOC), organizations (ORG), person (PER), and Miscellaneous (MISC). Although it is a more compact model, distilbert-NER demonstrates a robust performance in NER tasks, balancing between size, speed, and accuracy.
|
26 |
|
@@ -36,8 +36,8 @@ This model can be utilized with the Transformers *pipeline* for NER, similar to
|
|
36 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
37 |
from transformers import pipeline
|
38 |
|
39 |
-
tokenizer = AutoTokenizer.from_pretrained("LukeGPT88/distilbert-
|
40 |
-
model = AutoModelForTokenClassification.from_pretrained("LukeGPT88/distilbert-
|
41 |
|
42 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
43 |
example = "My name is Wolfgang and I live in Berlin"
|
@@ -48,7 +48,7 @@ print(ner_results)
|
|
48 |
|
49 |
#### Limitations and bias
|
50 |
|
51 |
-
The performance of distilbert-
|
52 |
|
53 |
|
54 |
## Training data
|
@@ -85,20 +85,10 @@ Train |946 |14,987 |203,621
|
|
85 |
Dev |216 |3,466 |51,362
|
86 |
Test |231 |3,684 |46,435
|
87 |
|
88 |
-
## Training procedure
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
## Eval results
|
93 |
-
| Metric | Score |
|
94 |
-
|------------|-------|
|
95 |
-
| Loss | 0.0710|
|
96 |
-
| Precision | 0.9202|
|
97 |
-
| Recall | 0.9232|
|
98 |
-
| F1 | 0.9217|
|
99 |
-
| Accuracy | 0.9810|
|
100 |
-
|
101 |
-
The training and validation losses demonstrate a decrease over epochs, signaling effective learning. The precision, recall, and F1 scores are competitive, showcasing the model's robustness in NER tasks.
|
102 |
|
103 |
### BibTeX entry and citation info
|
104 |
|
|
|
7 |
- f1
|
8 |
- accuracy
|
9 |
model-index:
|
10 |
+
- name: distilbert-base-eng-cased-ner
|
11 |
results: []
|
12 |
datasets:
|
13 |
- conll2003
|
|
|
20 |
|
21 |
## Model description
|
22 |
|
23 |
+
**distilbert-base-eng-cased-ner** is the fine-tuned version of **DistilBERT**, which is a distilled variant of the BERT model. DistilBERT has fewer parameters than BERT, making it smaller, faster, and more efficient. distilbert-NER is specifically fine-tuned for the task of **Named Entity Recognition (NER)**.
|
24 |
|
25 |
This model accurately identifies the same four types of entities as its BERT counterparts: location (LOC), organizations (ORG), person (PER), and Miscellaneous (MISC). Although it is a more compact model, distilbert-NER demonstrates a robust performance in NER tasks, balancing between size, speed, and accuracy.
|
26 |
|
|
|
36 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
37 |
from transformers import pipeline
|
38 |
|
39 |
+
tokenizer = AutoTokenizer.from_pretrained("LukeGPT88/distilbert-base-eng-cased-ner")
|
40 |
+
model = AutoModelForTokenClassification.from_pretrained("LukeGPT88/distilbert-base-eng-cased-ner")
|
41 |
|
42 |
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
43 |
example = "My name is Wolfgang and I live in Berlin"
|
|
|
48 |
|
49 |
#### Limitations and bias
|
50 |
|
51 |
+
The performance of distilbert-base-eng-cased-ner is linked to its training on the CoNLL-2003 dataset. Therefore, it might show limited effectiveness on text data that significantly differs from this training set. Users should be aware of potential biases inherent in the training data and the possibility of entity misclassification in complex sentences.
|
52 |
|
53 |
|
54 |
## Training data
|
|
|
85 |
Dev |216 |3,466 |51,362
|
86 |
Test |231 |3,684 |46,435
|
87 |
|
88 |
+
## Training procedure and Eval Results
|
89 |
|
90 |
+
Training and evaluation results come from the model on
|
91 |
+
https://huggingface.co/dslim/distilbert-NER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
### BibTeX entry and citation info
|
94 |
|