answerdotai/ModernBERT-base, fine-tuned on SST-2
This is not ModernBERT-base, which ships without a classification head. It is ModernBERT fine-tuned on SST-2, built as a drop-in replacement for the distilbert-sst2 checkpoint that most sentiment pipelines still default to.

Sensible
AnkitAI/Sensible-ModernBERT-Sentiment-AnalysisIf you have ever called pipeline("sentiment-analysis") without naming a model, you have used distilbert-base-uncased-finetuned-sst-2-english. It is the default, it is downloaded millions of times a month, and it was fine-tuned on a backbone from 2019. This is the same task, on the same dataset, on an encoder released five years later.
The comparison is unusually clean, which is the reason this model is worth publishing at all. SST-2 has an official validation set of 872 examples that every SST-2 model reports on, so there is no split ambiguity: 0.9461 against 0.9130, a gap of 3.3 points, measured on the split both models are supposed to use. The card states the validation set was never used for training or checkpoint selection — a held-back 5% of train was used for that instead. SST-2 is also a saturated benchmark, so those 3.3 points are a real improvement on this data rather than a promise about yours.
Same two labels and the same semantics as the incumbent, so swapping the model string is the whole migration. What comes with those labels is the SST-2 convention: two classes, no neutral, English, sentence or short-paragraph length. Genuinely neutral text is forced to a side and comes back with a confident label, which is the thing to check before pointing this at survey or support data. It was trained on movie-review sentences and transfers well to general reviews and comments, less well to domain jargon such as financial text.
The numbers
SST-2 official validation set (872 examples) — the split every SST-2 model reports on.
| Model | Accuracy |
|---|---|
| This model | 0.9461 |
| distilbert-base-uncased-finetuned-sst-2-english (the default) | 0.9130 |
Figures as reported on the model's own Hugging Face card. Quoted here, not re-measured.
Run it
from transformers import pipeline
clf = pipeline(
"text-classification",
model="AnkitAI/Sensible-ModernBERT-Sentiment-Analysis",
)
clf("This movie was absolutely wonderful!")
# [{'label': 'positive', 'score': 0.99}]Try others
- cardiffnlp/twitter-roberta-base-sentiment-latest — product-review sentimentTuned on Amazon reviews rather than tweets, so it holds up on the blunt, typo-heavy language reviews are written in.
- answerdotai/ModernBERT-base — financial news sentimentBest accuracy in the series at 0.8675, on a five-years-newer encoder than FinBERT.
Where to get it
- Base model
- answerdotai/ModernBERT-base
- Training data
- SST-2 (GLUE, 67k sentences)