Instructions to use Kroalist/financial-sentiment-bert-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kroalist/financial-sentiment-bert-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Kroalist/financial-sentiment-bert-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Kroalist/financial-sentiment-bert-base") model = AutoModelForSequenceClassification.from_pretrained("Kroalist/financial-sentiment-bert-base") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Kroalist/financial-sentiment-bert-base")
model = AutoModelForSequenceClassification.from_pretrained("Kroalist/financial-sentiment-bert-base")Quick Links
Financial Sentiment BERT-Base (BERT-base-uncased fine-tune)
Fine-tuned on Financial PhraseBank for three-way sentiment.
| Item | Value |
|---|---|
| Base model | bert-base-uncased |
| Dataset | Financial PhraseBank |
| Labels | positive (0) · negative (1) · neutral (2) |
| Epochs | 4 |
| Hardware | CPU-only training |
Evaluation Results (Validation + Test)
Validation Accuracy (best): 81.32%
Test Performance:
precision recall f1-score support
positive 0.71 0.75 0.73 204
negative 0.67 0.81 0.74 91
neutral 0.88 0.82 0.85 432
accuracy 0.80 727
macro avg 0.75 0.79 0.77 727
weighted avg 0.81 0.80 0.80 727
Training completed in 17m 9s. Logs are available in training_logs.csv and training curve in training_metrics.png.
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tok = AutoTokenizer.from_pretrained("Kroalist/financial-sentiment-bert-base")
model = AutoModelForSequenceClassification.from_pretrained("Kroalist/financial-sentiment-bert-base")
Last updated: 2025-04-23
- Downloads last month
- 6
Model tree for Kroalist/financial-sentiment-bert-base
Base model
google-bert/bert-base-uncased
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Kroalist/financial-sentiment-bert-base")