A production-ready financial sentiment classifier fine-tuned on FinBERT. This model utilizes a Multi-Task Architecture (Classification + Regression) to achieve state-of-the-art performance across diverse financial text sources, including professional news, social media, and forum discussions.
This Multi-Task model achieves 85.4% overall accuracy, significantly outperforming standard baselines, particularly on noisy social media data.
| Metric / Dataset | FinBERT (Multi-Task) | FinBERT (LoRA) |
|---|---|---|
| Overall Accuracy | 85.4% | 83.2% |
| Macro F1-Score | 0.83 | 0.80 |
| Financial PhraseBank (News) | 95.9% | 97.1% |
| Twitter Financial News | 83.3% | 80.5% |
| FiQA (Forums) | 81.5% | 72.6% |
Note: For edge deployment or low-memory environments, check out the LoRA version which reduces storage by 99% (5MB vs 420MB).
Unlike standard sentiment classifiers, this model shares a bert-base backbone with two task-specific heads:
Negative/Neutral/Positive (Optimized for News & Twitter).This approach yielded a +6.1% accuracy boost on Twitter data compared to single-task training, proving that learning continuous sentiment intensity helps the model understand noisy social text better.
You can use this model directly with the Hugging Face pipeline or AutoModel:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load the model and tokenizer
model_name = "pmatorras/financial-sentiment-multi-task"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Inference
text = "The stock market rally is driven by strong tech earnings."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
print(probabilities)
pytorch_model.bin 438 MBmodel.safetensors 438 MBProsusAI/finbert