Kroalist's picture
Initial upload of BERT-base financial sentiment model
11f6ecd verified
---
language: [en]
license: apache-2.0
library_name: transformers
pipeline_tag: text-classification
datasets: [financial_phrase_bank]
base_model: bert-base-uncased
tags:
- sentiment-analysis
- finance
- text-classification
---
# 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
```python
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_