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:
- Loss: 0.0631
- Precision: 0.9414
- Recall: 0.9493
- F1: 0.9454
- Accuracy: 0.9866
Model description
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)
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 5
- mixed_precision_training: Native AMP
Training results
| 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 |
Framework versions
- Transformers 4.46.1
- Pytorch 1.13.1+cu116
- Datasets 3.1.0
- Tokenizers 0.20.1
- Downloads last month
- 10
Model tree for PassbyGrocer/bert-ner-conll2003
Base model
google-bert/bert-base-uncasedDataset used to train PassbyGrocer/bert-ner-conll2003
Evaluation results
- Precision on conll2003validation set self-reported0.941
- Recall on conll2003validation set self-reported0.949
- F1 on conll2003validation set self-reported0.945
- Accuracy on conll2003validation set self-reported0.987