asofter commited on
Commit
0a8190a
·
1 Parent(s): 3b87ba0

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ inference: false
5
+ pipeline_tag: token-classification
6
+ tags:
7
+ - ner
8
+ - bert
9
+ license: mit
10
+ datasets:
11
+ - conll2003
12
+ model-index:
13
+ - name: dslim/bert-large-NER
14
+ results:
15
+ - task:
16
+ type: token-classification
17
+ name: Token Classification
18
+ dataset:
19
+ name: conll2003
20
+ type: conll2003
21
+ config: conll2003
22
+ split: test
23
+ metrics:
24
+ - name: Accuracy
25
+ type: accuracy
26
+ value: 0.9031688753722759
27
+ verified: true
28
+ - name: Precision
29
+ type: precision
30
+ value: 0.920025068328604
31
+ verified: true
32
+ - name: Recall
33
+ type: recall
34
+ value: 0.9193688678588825
35
+ verified: true
36
+ - name: F1
37
+ type: f1
38
+ value: 0.9196968510445761
39
+ verified: true
40
+ - name: loss
41
+ type: loss
42
+ value: 0.5085050463676453
43
+ verified: true
44
+ ---
45
+
46
+ # ONNX version of dslim/bert-large-NER
47
+
48
+ **This model is a conversion of [dslim/bert-large-NER](https://huggingface.co/dslim/bert-large-NER) to ONNX** format using the [🤗 Optimum](https://huggingface.co/docs/optimum/index) library.
49
+
50
+ **bert-large-NER** is a fine-tuned BERT model that is ready to use for **Named Entity Recognition** and achieves **state-of-the-art performance** for the NER task. It has been trained to recognize four types of entities: location (LOC), organizations (ORG), person (PER) and Miscellaneous (MISC).
51
+
52
+ Specifically, this model is a *bert-large-cased* model that was fine-tuned on the English version of the standard [CoNLL-2003 Named Entity Recognition](https://www.aclweb.org/anthology/W03-0419.pdf) dataset.
53
+
54
+ ## Usage
55
+
56
+ Loading the model requires the [🤗 Optimum](https://huggingface.co/docs/optimum/index) library installed.
57
+
58
+ ```python
59
+ from optimum.onnxruntime import ORTModelForTokenClassification
60
+ from transformers import AutoTokenizer, pipeline
61
+
62
+
63
+ tokenizer = AutoTokenizer.from_pretrained("laiyer/bert-large-NER-onnx")
64
+ model = ORTModelForTokenClassification.from_pretrained("laiyer/bert-large-NER-onnx")
65
+ ner = pipeline(
66
+ task="ner",
67
+ model=model,
68
+ tokenizer=tokenizer,
69
+ )
70
+
71
+ ner_output = ner("My name is John Doe.")
72
+ print(ner_output)
73
+ ```