Downloads · 30 days
9
0% of all-time downloads
supreethrao/instructNER_ontonotes5_xl
instructNER_ontonotes5_xl is a token classification model from supreethrao. Use it when you need labels on individual words, such as names. It is set up for span-marker.
This is a SpanMarker model trained on the SpeedOfMagic/ontonotesenglish dataset that can be used for Named Entity Recognition.
Downloads · 30 days
9
0% of all-time downloads
All-time downloads
10.2K
Public
Parameters
125M
6.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors997 MB · 99%
From the Hugging Face model README
This is a SpanMarker model trained on the SpeedOfMagic/ontonotes_english dataset that can be used for Named Entity Recognition.
| Label | Examples |
|---|---|
| CARDINAL | "tens of thousands", "One point three million", "two" |
| DATE | "Sunday", "a year", "two thousand one" |
| EVENT | "World War Two", "Katrina", "Hurricane Katrina" |
| FAC | "Route 80", "the White House", "Dylan 's Candy Bars" |
| GPE | "America", "Atlanta", "Miami" |
| LANGUAGE | "English", "Russian", "Arabic" |
| LAW | "Roe", "the Patriot Act", "FISA" |
| LOC | "Asia", "the Gulf Coast", "the West Bank" |
| MONEY | "twenty - seven million dollars", "one hundred billion dollars", "less than fourteen thousand dollars" |
| NORP | "American", "Muslim", "Americans" |
| ORDINAL | "third", "First", "first" |
| ORG | "Wal - Mart", "Wal - Mart 's", "a Wal - Mart" |
| PERCENT | "seventeen percent", "sixty - seven percent", "a hundred percent" |
| PERSON | "Kira Phillips", "Rick Sanchez", "Bob Shapiro" |
| PRODUCT | "Columbia", "Discovery Shuttle", "Discovery" |
| QUANTITY | "forty - five miles", "six thousand feet", "a hundred and seventy pounds" |
| TIME | "tonight", "evening", "Tonight" |
| WORK_OF_ART | "A Tale of Two Cities", "Newsnight", "Headline News" |
| Label | Precision | Recall | F1 |
|---|---|---|---|
| all | 0.9046 | 0.9109 | 0.9077 |
| CARDINAL | 0.8579 | 0.8524 | 0.8552 |
| DATE | 0.8634 | 0.8893 | 0.8762 |
| EVENT | 0.6719 | 0.6935 | 0.6825 |
| FAC | 0.7211 | 0.7852 | 0.7518 |
| GPE | 0.9725 | 0.9647 | 0.9686 |
| LANGUAGE | 0.9286 | 0.5909 | 0.7222 |
| LAW | 0.7941 | 0.7297 | 0.7606 |
| LOC | 0.7632 | 0.8101 | 0.7859 |
| MONEY | 0.8914 | 0.8885 | 0.8900 |
| NORP | 0.9311 | 0.9643 | 0.9474 |
| ORDINAL | 0.8227 | 0.9282 | 0.8723 |
| ORG | 0.9217 | 0.9073 | 0.9145 |
| PERCENT | 0.9145 | 0.9198 | 0.9171 |
| PERSON | 0.9638 | 0.9643 | 0.9640 |
| PRODUCT | 0.6778 | 0.8026 | 0.7349 |
| QUANTITY | 0.7850 | 0.8 | 0.7925 |
| TIME | 0.6794 | 0.6730 | 0.6762 |
| WORK_OF_ART | 0.6562 | 0.6442 | 0.6502 |
from span_marker import SpanMarkerModel
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("supreethrao/instructNER_ontonotes5_xl")
# Run inference
entities = model.predict("Robert White, Canadian Auto Workers union president, used the impending Scarborough shutdown to criticize the U.S. - Canada free trade agreement and its champion, Prime Minister Brian Mulroney.")
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>from span_marker import SpanMarkerModel, Trainer
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("supreethrao/instructNER_ontonotes5_xl")
# Specify a Dataset with "tokens" and "ner_tag" columns
dataset = load_dataset("conll2003") # For example CoNLL2003
# Initialize a Trainer using the pretrained model & dataset
trainer = Trainer(
model=model,
train_dataset=dataset["train"],
eval_dataset=dataset["validation"],
)
trainer.train()
trainer.save_model("supreethrao/instructNER_ontonotes5_xl-finetuned")
</details>
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
| Training set | Min | Median | Max |
|---|---|---|---|
| Sentence length | 1 | 18.1647 | 210 |
| Entities per sentence | 0 | 1.3655 | 32 |
@software{Aarsen_SpanMarker,
author = {Aarsen, Tom},
license = {Apache-2.0},
title = {{SpanMarker for Named Entity Recognition}},
url = {https://github.com/tomaarsen/SpanMarkerNER}
}
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->