Downloads · 30 days
31
33% of all-time downloads
ppokhrel2109/besstie-sarcasm-deberta-v3
besstie-sarcasm-deberta-v3 is a text classification model from ppokhrel2109. 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.
Sarcasm classification for Australian, British and Indian English, trained on the BESSTIE benchmark.
Downloads · 30 days
31
33% of all-time downloads
All-time downloads
93
Public
Parameters
184M
740 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors738 MB · 99%
From the Hugging Face model README
Sarcasm classification for Australian, British and Indian English, trained on the BESSTIE benchmark.
184M parameters, ~25 ms per prediction on CPU.
Macro-F1 on the official validation split, in-dialect, mean over 5 seeds.
| variety | macro-F1 | sarcasm/positive F1 | majority baseline |
|---|---|---|---|
| en-AU | 0.751 | 0.728 | 0.366 |
| en-UK | 0.687 | 0.515 | 0.439 |
| en-IN | 0.629 | 0.396 | 0.460 |
The majority-class baseline is shown because it is the number that makes the others interpretable: a model that never predicts the minority class scores about 0.46 on this task, so scores near 0.50 indicate no learning.
argmax is the wrong operating point. The positive class is a minority, so the threshold
was tuned on validation to maximise macro-F1:
Both must be applied together and in that order. A threshold fitted on raw probabilities but applied to temperature-scaled ones labels every input positive.
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
name = "ppokhrel2109/besstie-sarcasm-deberta-v3"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForSequenceClassification.from_pretrained(name).eval()
text = "oh brilliant, another delayed train"
with torch.no_grad():
logits = model(**tok(text, return_tensors="pt", truncation=True, max_length=128)).logits
probability = torch.softmax(logits / 1.1819, dim=-1)[0, 1].item()
label = "sarcastic" if probability >= 0.360 else "not sarcastic"
Class-weighted cross-entropy, threshold tuned on a held-out slice of train, five seeds. Sarcasm is evaluated on the Reddit subset only, matching the benchmark's protocol.
Code, full results and reproduction steps: https://github.com/Pranav210901/Besstie-improvement-attempt