asahi417 commited on
Commit
64d850d
·
1 Parent(s): 3e41f9c

model update

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -79,6 +79,24 @@ For F1 scores, the confidence interval is obtained by bootstrap as below:
79
  Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/deberta-v3-large-conll2003/raw/main/eval/metric.json)
80
  and [metric file of entity span](https://huggingface.co/tner/deberta-v3-large-conll2003/raw/main/eval/metric_span.json).
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  ### Training hyperparameters
84
 
 
79
  Full evaluation can be found at [metric file of NER](https://huggingface.co/tner/deberta-v3-large-conll2003/raw/main/eval/metric.json)
80
  and [metric file of entity span](https://huggingface.co/tner/deberta-v3-large-conll2003/raw/main/eval/metric_span.json).
81
 
82
+ ### Usage
83
+ This model can be used through the transformers library by
84
+ ```python
85
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
86
+ tokenizer = AutoTokenizer.from_pretrained("tner/deberta-v3-large-conll2003")
87
+ model = AutoModelForTokenClassification.from_pretrained("tner/deberta-v3-large-conll2003")
88
+ ```
89
+ but, since transformers do not support CRF layer, it is recommended to use the model via `T-NER` library.
90
+ Install the library via pip
91
+ ```shell
92
+ pip install tner
93
+ ```
94
+ and activate model as below.
95
+ ```
96
+ from tner import TransformersNER
97
+ model = TransformersNER("tner/deberta-v3-large-conll2003")
98
+ model.predict("Jacob Collier is a Grammy awarded English artist from London".split(" "))
99
+ ```
100
 
101
  ### Training hyperparameters
102