NER Encoder-based Models
Collection
This collections gathers several NER models. Either fine-tuned versions for specific tasks or generic backbone models ready to be fine-tuned.
•
8 items
•
Updated
This is a NuNER model fine-tuned on the NER-ORGS dataset that can be used for Named Entity Recognition. NuNER model uses RoBERTa-base as the backbone encoder and it was trained on the NuNER dataset, which is a large and diverse dataset synthetically labeled by gpt-3.5-turbo-0301 of 1M sentences. This further pre-training phase allowed the generation of high quality token embeddings, a good starting point for fine-tuning on more specialized datasets.
The model was fine-tuned as a regular BERT-based model for NER task using HuggingFace Trainer class.
Entity Types: ORG
>>> from transformers import pipeline
>>> text = """Foreign governments may be spying on your smartphone notifications, senator says. Washington (CNN) — Foreign governments have reportedly attempted to spy on iPhone and Android users through the mobile app notifications they receive on their smartphones - and the US government has forced Apple and Google to keep quiet about it, according to a top US senator. Through legal demands sent to the tech giants, governments have allegedly tried to force Apple and Google to turn over sensitive information that could include the contents of a notification - such as previews of a text message displayed on a lock screen, or an update about app activity, Oregon Democratic Sen. Ron Wyden said in a new report. Wyden's report reflects the latest example of long-running tensions between tech companies and governments over law enforcement demands, which have stretched on for more than a decade. Governments around the world have particularly battled with tech companies over encryption, which provides critical protections to users and businesses while in some cases preventing law enforcement from pursuing investigations into messages sent over the internet."""
>>> classifier = pipeline(
"ner",
model="guishe/nuner-v1_orgs",
aggregation_strategy="simple",
)
>>> classifier(text)
[{'entity_group': 'ORG',
'score': 0.9821347,
'word': 'CNN',
'start': 94,
'end': 97},
{'entity_group': 'ORG',
'score': 0.99382174,
'word': ' Apple',
'start': 288,
'end': 293},
{'entity_group': 'ORG',
'score': 0.99351865,
'word': ' Google',
'start': 298,
'end': 304},
{'entity_group': 'ORG',
'score': 0.992792,
'word': ' Apple',
'start': 449,
'end': 454},
{'entity_group': 'ORG',
'score': 0.99385214,
'word': ' Google',
'start': 459,
'end': 465}]
The following hyperparameters were used during training:
Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
---|---|---|---|---|---|---|---|
0.0631 | 1.0 | 1710 | 0.0566 | 0.7635 | 0.7952 | 0.7790 | 0.9778 |
0.0572 | 2.0 | 3420 | 0.0580 | 0.7816 | 0.7925 | 0.7870 | 0.9785 |
0.0429 | 3.0 | 5130 | 0.0562 | 0.7869 | 0.8084 | 0.7975 | 0.9790 |
0.0336 | 4.0 | 6840 | 0.0631 | 0.7912 | 0.8045 | 0.7978 | 0.9790 |
@misc{bogdanov2024nuner,
title={NuNER: Entity Recognition Encoder Pre-training via LLM-Annotated Data},
author={Sergei Bogdanov and Alexandre Constantin and Timothée Bernard and Benoit Crabbé and Etienne Bernard},
year={2024},
eprint={2402.15343},
archivePrefix={arXiv},
primaryClass={cs.CL}
}