Instructions to use x4n4/bert_conll2003_ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use x4n4/bert_conll2003_ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="x4n4/bert_conll2003_ner")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("x4n4/bert_conll2003_ner") model = AutoModelForTokenClassification.from_pretrained("x4n4/bert_conll2003_ner") - Notebooks
- Google Colab
- Kaggle
File size: 1,072 Bytes
4d206d5 2b210ce 3689ed7 2b210ce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ---
library_name: transformers
tags: []
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
# BERT NER Model (CoNLL-2003)
## ๐ Overview
This model is a fine-tuned version of `bert-base-cased` for the task of Named Entity Recognition (NER).
## ๐ฏ Task
Token Classification (Named Entity Recognition)
The model identifies the following entity types:
- PER (Person)
- ORG (Organization)
- LOC (Location)
- MISC (Miscellaneous)
## ๐ Dataset
- CoNLL-2003 (English news dataset)
- Only NER tags were used (BIO format)
## ๐ง Model Details
- Base model: `bert-base-cased`
- Architecture: Transformer Encoder (BERT)
- Fine-tuning: Hugging Face Transformers
- Training epochs: 3
## ๐ Performance
Test set results:
- Precision: ~0.90
- Recall: ~0.91
- F1-score: ~0.91
- Accuracy: ~0.98
## โ๏ธ Usage Example
```python
from transformers import pipeline
ner = pipeline(
"ner",
model="x4n4/bert-conll2003-ner",
aggregation_strategy="simple"
)
text = "Barack Obama visited Google in New York"
print(ner(text)) |