Downloads · 30 days
14
42% of all-time downloads
ppokhrel2109/besstie-sentiment-deberta-v3
besstie-sentiment-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.
Sentiment classification for Australian, British and Indian English, trained on the BESSTIE benchmark.
Downloads · 30 days
14
42% of all-time downloads
All-time downloads
33
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
Sentiment 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.
Results file not found; see the repository.
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-sentiment-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.9059, dim=-1)[0, 1].item()
label = "positive" if probability >= 0.210 else "negative"
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