Downloads · 30 days
4
14% of all-time downloads
vivekkopthsd/financial-sentiment-distilbert
financial-sentiment-distilbert is a text classification model from vivekkopthsd. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as other.
Fine-tuned distilbert-base-uncased for 3-class financial news sentiment (positive / neutral / negative).
Downloads · 30 days
4
14% of all-time downloads
All-time downloads
28
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
Fine-tuned distilbert-base-uncased for 3-class financial news sentiment
(positive / neutral / negative).
| Base model | distilbert-base-uncased |
| Task | Financial sentiment classification (3 classes) |
| Language | English |
| Training data | FinancialPhraseBank (Sentences_50Agree.txt, ~4,840 sentences; Malo et al., 2014) |
| Hardware | NVIDIA Tesla T4 |
| Fine-tuning | 3 epochs, lr 2e-05, batch 32, max length 128, seed 42 |
from transformers import pipeline
clf = pipeline("text-classification", model="vivekkopthsd/financial-sentiment-distilbert")
clf("The company reported a significant increase in quarterly revenue.")
Stratified 80/10/10 split (seed 42): train 3876 / validation 485 / test 485.
Test accuracy: 0.8144 · Weighted F1: 0.8153
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| negative | 0.7391 | 0.8361 | 0.7846 | 61 |
| neutral | 0.8700 | 0.8368 | 0.8531 | 288 |
| positive | 0.7410 | 0.7574 | 0.7491 | 136 |
FinancialPhraseBank: Malo, P., Sinha, A., Korhonen, P., Wallenius, J., & Takala, P. (2014). Good debt or bad debt: Detecting semantic orientations in economic texts. Journal of the Association for Information Science and Technology. Kaggle mirror: ankurzing/sentiment-analysis-for-financial-news.