CoolFace
Modelpublic

AnkitAI/Sensible-ModernBERT-Sentiment-Analysis

sourceHugging Faceapache-2.0updated 3d agoView on Hugging Face
1likes43downloads
Model Card

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ankit-aglawe/parable-assets/main/sensibleheaderdark.png"> <img alt="Sensible" src="https://raw.githubusercontent.com/ankit-aglawe/parable-assets/main/sensible_header.png"> </picture>

๐Ÿฆ‰ Sensible โ€” ModernBERT Sentiment Analysis

The modern replacement for the classic SST-2 sentiment model โ€” 0.946 vs 0.913 on the exact same benchmark, one pipeline() line.

python
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}]

positive / negative for reviews, comments, feedback, social text. Built on ModernBERT-base โ€” Flash-Attention-fast, 149M params, CPU-friendly.


Benchmarks

SST-2 official validation set (872 examples) โ€” the same split every SST-2 model reports on:

ModelAccuracy
๐Ÿ’ฌ This model0.9461
distilbert-base-uncased-finetuned-sst-2-english (the 3.9M-downloads/month default)0.9130

+3.3 points over the model most pipelines still default to โ€” from an encoder released five years later. Training script and raw eval outputs ship in this repo; the reported split was never used for training or checkpoint selection.

Labels

idlabel
0negative
1positive

Batch scoring:

python
texts = ["Best purchase I've made all year.",
         "Waited 40 minutes and the order was still wrong."]
for t, r in zip(texts, clf(texts, batch_size=64)):
    print(f"{r['label']:<9} {r['score']:.2f}  {t}")

Built for

  • โ€”Product & review analytics โ€” score feedback streams at scale
  • โ€”Social/comment moderation dashboards โ€” fast, CPU-deployable
  • โ€”Drop-in upgrade โ€” same task and label semantics as the distilbert-sst2 default your stack probably uses

Good to know

  • โ€”Two classes only (no neutral) โ€” SST-2 convention; genuinely neutral text gets forced to a side
  • โ€”English, sentence/short-paragraph level
  • โ€”Trained on movie-review sentences (SST-2); transfers well to general reviews/comments, less so to domain jargon โ€” for financial text use FinSense

Training details

Full fine-tune of ModernBERT-base on SST-2 (GLUE, 67k sentences): 2 epochs, lr 2e-5, batch 32, fp32, best checkpoint by held-back 5% of train โ€” the official validation set stayed untouched until final reporting.

Support the Project

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>

Citation

bibtex
@misc{sensiblesentiment2026,
  author = {Aglawe, Ankit},
  title = {Sensible: ModernBERT Sentiment Analysis},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/AnkitAI/Sensible-ModernBERT-Sentiment-Analysis}
}

Base & license

Apache-2.0 (ModernBERT-base, Answer.AI). Trained on SST-2 (Socher et al., 2013 / GLUE).

More from AnkitAI

ModelTaskScore
FinSense ModernBERTfinancial news sentiment (3-class)0.8675
FinSense distilbert v2financial news sentiment, tiny0.8447
Parablelocal agent LLMs (GGUF)โ€”

Version history

  • โ€”v1 (2026-07-20) โ€” initial release: ModernBERT-base, SST-2, seed 42.

More on the Sensible models: ankitaglawe.com/sensible