Named Entity Recognition using DistilBERT

Model Description

This model is a fine-tuned DistilBERT model for Named Entity Recognition (NER).

It identifies entities in text, including people, organizations, locations, dates, money, events and other categories.

Base Model

distilbert/distilbert-base-cased

Dataset

OntoNotes 5.0

Dataset: https://huggingface.co/datasets/tner/ontonotes5

Training Configuration

  • Architecture: DistilBERT
  • Task: Token Classification
  • Number of labels: 37
  • Epochs: 2
  • Learning rate: 2e-5
  • Training batch size: 16
  • Maximum sequence length: 256
  • Optimizer: AdamW (Trainer default)

Test Results

Metric Score
Precision 85.49%
Recall 88.24%
F1-score 86.84%
Token Accuracy 97.99%

Entity Labels

The model uses BIO tagging with 37 labels, representing 18 entity categories and the O label.

Usage

from transformers import pipeline

ner = pipeline( "token-classification", model="Sameer63343/ner-distilbert-ontonotes5", aggregation_strategy="simple" )

text = "Microsoft organized a conference in Islamabad."

results = ner(text)

for entity in results: print(entity)

Limitations

This model was trained on OntoNotes 5.0. Performance may vary on specialized documents and domains that differ from its training data.

Downloads last month
-
Safetensors
Model size
65.2M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support