Downloads · 30 days
19
12% of all-time downloads
musk1209/finsight-ner
finsight-ner is a token classification model from musk1209. Use it when you need labels on individual words, such as names. The card lists the license as cc-by-nc-4.0.
A financial-domain NER model fine-tuned from bert-base-uncased on the FiNER-ORD dataset (Shah et al., 2024), a manually-annotated corpus of financial news articles.
Downloads · 30 days
19
12% of all-time downloads
All-time downloads
159
Public
Parameters
109M
871 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
A financial-domain NER model fine-tuned from bert-base-uncased on the
FiNER-ORD
dataset (Shah et al., 2024), a manually-annotated corpus of financial
news articles.
Recognizes three entity types in BIO format:
Part of the FinSight project.
Micro-averaged across all entity types:
| metric | value |
|---|---|
| precision | 0.7876 |
| recall | 0.8464 |
| f1 | 0.8159 |
LOC 0.7896 0.8633 0.8248 300
ORG 0.7222 0.7993 0.7588 553
PER 0.9261 0.9196 0.9228 286
micro 0.7876 0.8464 0.8159
| Setting | Value |
|---|---|
| Base model | bert-base-uncased |
| Dataset | gtfintechlab/finer-ord-bio |
| Train / Val / Test | 3,261 / 402 / 1,075 sentences |
| Epochs | 4 |
| Batch size | 16 |
| Learning rate | 3e-5 (linear warmup over 10% of steps) |
| Weight decay | 0.01 |
| Max sequence length | 192 |
| Optimizer | AdamW (default) |
| Mixed precision | fp16 |
| Seed | 42 |
| Hardware | NVIDIA Tesla T4 (Kaggle) |
| Training runtime | ~2.5 minutes |
| ID | Label |
|---|---|
| 0 | O |
| 1 | B-PER |
| 2 | I-PER |
| 3 | B-LOC |
| 4 | I-LOC |
| 5 | B-ORG |
| 6 | I-ORG |
from transformers import pipeline
ner = pipeline(
"token-classification",
model="musk1209/finsight-ner",
aggregation_strategy="simple",
)
ner("Jamie Dimon, CEO of JPMorgan Chase, addressed shareholders in London.")
# [{'entity_group': 'PER', 'word': 'jamie dimon', 'score': 0.99, ...},
# {'entity_group': 'ORG', 'word': 'jpmorgan chase', 'score': 1.00, ...},
# {'entity_group': 'LOC', 'word': 'london', 'score': 0.99, ...}]
The seqeval library (the standard NER metric library) has a broken
pyproject.toml that prevents installation on Python 3.12. This model was
evaluated using a custom entity-level scorer with strict-match semantics;
see src/fine_tuning/ner_metrics.py
in the project repo.
@article{shah2024finerord, title = {FiNER-ORD: Financial Named Entity Recognition Open Research Dataset}, author = {Shah, Agam and Gullapalli, Abhinav and Vithani, Ruchit and Galarnyk, Michael and Chava, Sudheer}, journal = {arXiv preprint arXiv:2302.11157}, year = {2024} }