eriktks/conll2003
Updated • 38.9k • 166
How to use PassbyGrocer/bert-ner-conll2003 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="PassbyGrocer/bert-ner-conll2003") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("PassbyGrocer/bert-ner-conll2003")
model = AutoModelForTokenClassification.from_pretrained("PassbyGrocer/bert-ner-conll2003")This model is a fine-tuned version of bert-base-uncased on the conll2003 dataset. It achieves the following results on the evaluation set:
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
model = AutoModelForTokenClassification.from_pretrained("PassbyGrocer/bert-ner-conll2003")
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = "My name is Wolfgang and I live in Berlin."
ner_results = nlp(example)
print(ner_results)
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|---|---|---|---|---|---|---|---|
| 0.0844 | 1.0 | 878 | 0.0693 | 0.9029 | 0.9201 | 0.9114 | 0.9806 |
| 0.0216 | 2.0 | 1756 | 0.0559 | 0.9340 | 0.9444 | 0.9391 | 0.9854 |
| 0.0206 | 3.0 | 2634 | 0.0569 | 0.9436 | 0.9447 | 0.9442 | 0.9863 |
| 0.0141 | 4.0 | 3512 | 0.0634 | 0.9369 | 0.9488 | 0.9428 | 0.9860 |
| 0.0176 | 5.0 | 4390 | 0.0631 | 0.9414 | 0.9493 | 0.9454 | 0.9866 |
Base model
google-bert/bert-base-uncased