Downloads · 30 days
18
11% of all-time downloads
satyame639291/sarcasm-distilbert
sarcasm-distilbert is a text classification model from satyame639291. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
A fine-tuned distilbert-base-uncased model for classifying news headlines as Sarcastic or Not Sarcastic.
Downloads · 30 days
18
11% of all-time downloads
All-time downloads
166
Public
Parameters
67M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
A fine-tuned distilbert-base-uncased model for classifying news headlines as Sarcastic or Not Sarcastic.
Fine-tuned version of distilbert-base-uncased for binary sequence classification, trained on the News Headlines Dataset for Sarcasm Detection (Misra, 2019) — headlines from The Onion (satirical) paired with headlines from HuffPost (genuine).
| Label | Meaning |
|---|---|
| 0 | Not Sarcastic (genuine, from HuffPost) |
| 1 | Sarcastic (satirical, from The Onion) |
from transformers import pipeline
classifier = pipeline("text-classification", model="satyame639291/sarcasm-distilbert")
classifier("Shocking, Usain bolt realisies he can use legs for walking")
distilbert-base-uncasedload_best_model_at_end=True) — epoch 2 was selected as the final model.Evaluated on a held-out test set (4,276 headlines) not used in training or model selection:
| Model | Accuracy | F1 (weighted) |
|---|---|---|
| TF-IDF + Logistic Regression (default) | 77.34% | 0.7729 |
| TF-IDF + Logistic Regression (tuned) | 77.39% | 0.7736 |
| DistilBERT (this model) | 92.00% | 0.9200 |
Full methodology, EDA, and error analysis: training notebook.
Error patterns: false positives tended to be plain, non-humorous headlines rather than obviously quirky ones; false negatives mostly required outside knowledge (e.g. a public figure's reputation) that isn't present in the text itself.
Satyam — GitHub | Hugging Face