eriktks/conll2003
Updated • 39k • 166
How to use Wothmag07/NER-fine-tuned-model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="Wothmag07/NER-fine-tuned-model") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("Wothmag07/NER-fine-tuned-model")
model = AutoModelForTokenClassification.from_pretrained("Wothmag07/NER-fine-tuned-model")Fine-tuned BERT for Named Entity Recognition (NER)
This model is a fine-tuned version of google-bert/bert-base-uncased for Named Entity Recognition (NER) using the CoNLL-2003 dataset. The model classifies tokens into named entity categories such as persons, locations, organizations, and miscellaneous entities.
Run this snippet to use the model with 🤗 Transformers:
from transformers import pipeline
ner_pipeline = pipeline("ner", model="Wothmag07/NER-fine-tuned-model")
text = "Barack Obama was born in Hawaii."
results = ner_pipeline(text)
print(results)
The model was trained using the CoNLL-2003 dataset, which contains news articles annotated for named entities.
Batch size: 16
Learning rate: 2e-5
Epochs: 20
Optimizer: Adam
Tested on CoNLL-2003 test set with:
Accuracy: 0.987084
F1-score: 0.947727
Precision: 0.945248
Recall: 0.950218
Base model
google-bert/bert-base-uncased