eriktks/conll2003
Updated • 41.1k • 166
How to use 51la5/distilbert-base-NER with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="51la5/distilbert-base-NER") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("51la5/distilbert-base-NER")
model = AutoModelForTokenClassification.from_pretrained("51la5/distilbert-base-NER")# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("51la5/distilbert-base-NER")
model = AutoModelForTokenClassification.from_pretrained("51la5/distilbert-base-NER")DistilBERT base uncased, fine-tuned for NER using the conll03 english dataset. Note that this model is not sensitive to capital letters — "english" is the same as "English". For the case sensitive version, please use elastic/distilbert-base-cased-finetuned-conll03-english.
$ run_ner.py \
--model_name_or_path distilbert-base-uncased \
--label_all_tokens True \
--return_entity_level_metrics True \
--dataset_name conll2003 \
--output_dir /tmp/distilbert-base-uncased-finetuned-conll03-english \
--do_train \
--do_eval
After training, we update the labels to match the NER specific labels from the dataset conll2003
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="51la5/distilbert-base-NER")