lhoestq/conll2003
Viewer • Updated • 20.7k • 3.73k • 5
bert-base-cased fully fine-tuned for named entity recognition on CoNLL-2003. This is the delivered NER model: on the test set it scored higher than a feature-based run trained on the same data and seed.
train for learning, validation for checkpoint selection, test reported once.O, B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC, B-MISC, I-MISC.ner_tags as integers. Names follow the standard CoNLL-2003 order.bert-base-cased (110M).2e-5, classification head 1e-3.[CLS], [SEP], and padding use -100 and are ignored by the loss.Test set, one evaluation after training:
| Precision | Recall | F1 | Train loss | Test loss |
|---|---|---|---|---|
| 0.9047 | 0.9181 | 0.9114 | 0.08 | 0.12 |
Validation entity F1 by epoch: 0.926, 0.944, 0.946. The saved checkpoint is the last epoch, which was also the best validation F1.
The rejected feature-based run (frozen BERT, linear head only) reached a test F1 of 0.7973 on the same split.
English named entity recognition on sentences similar to CoNLL-2003 newswire: person, organization, location, and miscellaneous entities.
from transformers import AutoModelForTokenClassification, AutoTokenizer
repo_id = "karimepachecog/ner-bert-base-cased-full"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForTokenClassification.from_pretrained(repo_id)
O.Base model
google-bert/bert-base-cased