Downloads · 30 days
22.1K
33% of all-time downloads
AnkitAI/FinSense-ModernBERT-Financial-News-Sentiment-Analysis
FinSense-ModernBERT-Financial-News-Sentiment-Analysis is a text classification model from AnkitAI. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
<picture <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ankit-aglawe/parable-assets/main/finsenseheaderdark.png" <img alt="FinSense" src="https://raw.githubusercontent.com/ankit…
Downloads · 30 days
22.1K
33% of all-time downloads
All-time downloads
66.3K
Public
Parameters
150M
598 MB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors598 MB · 99%
From the Hugging Face model README
pipeline() line and you're scoring news.from transformers import pipeline
clf = pipeline("text-classification", model="AnkitAI/FinSense-ModernBERT-Financial-News-Sentiment-Analysis")
clf("The company's quarterly earnings surpassed all estimates.")
# [{'label': 'positive', 'score': 0.99}]
positive / neutral / negative for headlines, news wires, analyst sentences. Built on ModernBERT-base — Flash-Attention-fast, 149M params, runs happily on CPU.
Financial PhraseBank (the standard benchmark for this task), held-out test set, identical harness for every row:
| Model | Accuracy | Macro-F1 |
|---|---|---|
| 🐂 FinSense | 0.8675 | 0.8589 |
| ProsusAI/finbert¹ | 0.8799 | 0.8761 |
| distilbert financial-sentiment v1 | 0.8323 | 0.8064 |
FinBERT scores higher on this table, and that is the point.¹ The public FinBERT checkpoint was trained on effectively the whole of Financial PhraseBank, so evaluating it on an FPB-derived split measures how much of the corpus it memorised, not how well it generalises. A fair comparison needs data neither model has seen; we do not yet publish one, so we do not claim a win here.
What this table does support: FinSense reaches 0.8675 on a fully held-out split with a 5-years-newer architecture, faster inference, and a published split script so every number is reproducible.
<sub>¹ Measured by us on the identical split, eval/incumbents_same_split.json in this repo — not quoted from another paper. A previous version of this card reported FinBERT at 0.8423/0.8439 citing an independent replication; that citation could not be verified and has been removed, along with the superiority claim that rested on it. Our own out-of-corpus measurement of FinBERT is substantially lower, but it is not published yet and is therefore not claimed here.</sub>
<sub>² Reproducibility note: across three training seeds this recipe averages 0.854 accuracy (range 0.845–0.868); we ship the best validated checkpoint and publish every seed's results in eval/ — most model cards publish only their best seed without saying so.</sub>
| id | label | example |
|---|---|---|
| 0 | negative | "Operating profit fell to EUR 35.4 mn from EUR 68.8 mn." |
| 1 | neutral | "The annual general meeting will be held on April 12." |
| 2 | positive | "Quarterly earnings surpassed all estimates." |
Batch scoring (thousands of headlines):
headlines = ["Shares jumped 8% after the guidance raise.",
"The company filed its annual report on Thursday.",
"Regulators fined the bank EUR 20 mn."]
for h, r in zip(headlines, clf(headlines, batch_size=32)):
print(f"{r['label']:<9} {r['score']:.2f} {h}")
Full fine-tune of ModernBERT-base on Financial PhraseBank (sentences_50agree, 4,846 expert-annotated sentences): 5 epochs, lr 2e-5, batch 16, max length 128, fp32, best checkpoint by validation macro-F1. Stratified 80/10/10 split with a fixed, published seed — the split script and raw evaluation outputs are in this repo, so every number above is reproducible end-to-end.
If this model is useful in your work, you can support independent research:
<p align="left"> <a href="https://www.buymeacoffee.com/AnkitAI" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me a Coffee" height="60" width="217" /></a> </p>@misc{finsense2026,
author = {Aglawe, Ankit},
title = {FinSense: Financial News Sentiment on Modern Encoders},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/AnkitAI/FinSense-ModernBERT-Financial-News-Sentiment-Analysis}
}
Apache-2.0 weights (ModernBERT-base, Answer.AI). Trained on Financial PhraseBank (Malo et al., 2014 — CC BY-NC-SA; commercial users, check dataset terms).
| Model | Size | Accuracy | Pick it for |
|---|---|---|---|
| This model | 149M | 0.8675 | best accuracy, modern stack |
| FinSense distilbert v2 | 67M | 0.8447 | smallest & fastest, drop-in upgrade for v1 users |
More sizes and a multilingual variant are on the roadmap. Sibling series: Parable — local agent LLMs from the same maker.
More on the FinSense models: ankitaglawe.com/finsense