tomaarsen/conll2003
Viewer โข Updated โข 20.7k โข 2.2k โข 1
How to use aryanmaurya006/ner-distilbert-conll2003 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="aryanmaurya006/ner-distilbert-conll2003") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("aryanmaurya006/ner-distilbert-conll2003")
model = AutoModelForTokenClassification.from_pretrained("aryanmaurya006/ner-distilbert-conll2003", device_map="auto")distilbert-base-cased fine-tuned for named entity recognition on CoNLL-2003.
It tags PER (person), ORG (organisation), LOC (location) and
MISC (miscellaneous) entities in English text.
This is the model used by the NER System project, which adds DATE detection with spaCy and a Streamlit app.
from transformers import pipeline
ner = pipeline(
"token-classification",
model="aryanmaurya006/ner-distilbert-conll2003",
aggregation_strategy="simple",
)
ner("Sundar Pichai met Narendra Modi in Delhi.")
| Entity | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| PER | 0.9610 | 0.9450 | 0.9529 | 1,617 |
| ORG | 0.8487 | 0.8814 | 0.8647 | 1,661 |
| LOC | 0.9180 | 0.9197 | 0.9188 | 1,668 |
| MISC | 0.7394 | 0.7963 | 0.7668 | 702 |
| Overall | 0.8856 | 0.9003 | 0.8929 | 5,648 |
distilbert-base-casedtomaarsen/conll2003), 14,041 training sentencesBase model
distilbert/distilbert-base-cased