Fine-tuned DistilBERT for Named Entity Recognition (NER)
Model Description
This model is a fine-tuned version of DistilBERT for Named Entity Recognition (NER) tasks. It was trained on the CoNLL-2003 dataset, designed to identify entities such as persons, organizations, locations, and miscellaneous entities within English text.
- Model Architecture: DistilBERT (pre-trained transformer-based model)
- Task: Named Entity Recognition (NER)
- Entity Types: PER (Person), ORG (Organization), LOC (Location), MISC (Miscellaneous)
Training Details
- Dataset: CoNLL-2003 (standard dataset for NER tasks)
- Training Data Size: 14,000 samples for training, 3,250 samples for evaluation
- Epochs: 3
- Batch Size: 16 (training), 64 (evaluation)
- Learning Rate: 2e-5
- Optimizer: AdamW with weight decay
Evaluation Metrics
The model was evaluated using the following metrics:
- F1 Score: 0.928661
- Accuracy: 0.983252
- Precision: 0.918794
- Recall: 0.938741
Example Usage
Here’s how to use this NER model with the Hugging Face Transformers library:
from transformers import pipeline
# Load the model from the Hugging Face Hub
ner_pipeline = pipeline("ner", model="Beehzod/smart-finetuned-ner")
# Example predictions
text = "Hugging Face Inc. is based in New York City, and its CEO is Clement Delangue."
results = ner_pipeline(text)
for entity in results:
print(f"Entity: {entity['word']}, Label: {entity['entity']}, Score: {entity['score']:.4f}")
- Downloads last month
- 130
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.