zeroshot/twitter-financial-news-sentiment
Viewer • Updated • 11.9k • 4.93k • 168
How to use jtatman/finetuning-twitter-sentiment-distilbert with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="jtatman/finetuning-twitter-sentiment-distilbert") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("jtatman/finetuning-twitter-sentiment-distilbert")
model = AutoModelForSequenceClassification.from_pretrained("jtatman/finetuning-twitter-sentiment-distilbert")This model is a fine-tuned version of distilbert-base-uncased on the zeroshot/twitter-financial-news-sentiment dataset. It achieves the following results on the evaluation set:
Finetuned Distilbert on Twitter Finance Sentiment Dataset (zeroshot/twitter-financial-news-sentiment)
Predict sentiment in financial reporting
Trained on colab using a custom notebook and dataset modifications (multi-class and f1 score adjusted)
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| No log | 1.0 | 478 | 0.4212 | 0.8444 | 0.8434 |
| 0.5568 | 2.0 | 956 | 0.4151 | 0.8565 | 0.8537 |
| 0.3143 | 3.0 | 1434 | 0.4950 | 0.8601 | 0.8572 |
| 0.1866 | 4.0 | 1912 | 0.5650 | 0.8586 | 0.8573 |
| 0.1144 | 5.0 | 2390 | 0.6031 | 0.8591 | 0.8578 |
Base model
distilbert/distilbert-base-uncased