zeroshot/twitter-financial-news-sentiment
Viewer β’ Updated β’ 11.9k β’ 4.93k β’ 172
Fine-tuned DistilBERT for financial text sentiment classification. Trained on 7,634 real financial news sentences, achieving F1 0.902 β outperforming GPT-4o-mini (F1 0.658) by +24.4 points.
| Model | Weighted F1 | Accuracy |
|---|---|---|
| GPT-4o-mini (baseline) | 0.658 | 65% |
| FinTone-DistilBERT | 0.902 | 90% |
| Delta | +0.244 | +25% |
| Class | Precision | Recall | F1 |
|---|---|---|---|
| Negative | 0.83 | 0.94 | 0.88 |
| Neutral | 0.97 | 0.90 | 0.93 |
| Positive | 0.74 | 0.88 | 0.80 |
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="SLYM06/fintone-distilbert-financial-sentiment"
)
result = classifier("The company reported record profits this quarter.")
print(result)
# [{'label': 'positive', 'score': 0.94}]
A domain-adapted 67M parameter model outperforms GPT-4o-mini on financial sentiment by 24.4 F1 points β demonstrating that fine-tuning a purpose-built classifier on domain-specific data is more effective and cost-efficient than prompting a general LLM.
Twitter Financial News Sentiment dataset β 9,543 financial news headlines and tweets labelled as positive, negative, or neutral.
Base model
distilbert/distilbert-base-uncased