1from transformers import pipeline
2
3clf = pipeline("text-classification", model="AnkitAI/Sensible-ModernBERT-Sentiment-Analysis")
4clf("This movie was absolutely wonderful!")
5# [{'label': 'positive', 'score': 0.99}]
positive / negative for reviews, comments, feedback, social text. Built on
ModernBERT-base — Flash-Attention-fast, 149M params, CPU-friendly.
SST-2 official validation set (872 examples) — the same split every SST-2 model reports on:
1texts = ["Best purchase I've made all year.",
2 "Waited 40 minutes and the order was still wrong."]
3for t, r in zip(texts, clf(texts, batch_size=64)):
4 print(f"{r['label']:<9} {r['score']:.2f} {t}")
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.
1@misc{sensiblesentiment2026,
2 author = {Aglawe, Ankit},
3 title = {Sensible: ModernBERT Sentiment Analysis},
4 year = {2026},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/AnkitAI/Sensible-ModernBERT-Sentiment-Analysis}
7}
Apache-2.0 (
ModernBERT-base, Answer.AI). Trained on
SST-2 (Socher et al., 2013 / GLUE).
More on the Sensible models:
ankitaglawe.com/sensible