Text Classification
Transformers
PyTorch
bert
sentiment
sentiment-analysis
financial
fine-tuned
fine-tuned-bert
bert-uncased
Instructions to use stfamod/fine-tuned-bert-financial-sentiment-analysis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stfamod/fine-tuned-bert-financial-sentiment-analysis with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="stfamod/fine-tuned-bert-financial-sentiment-analysis")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("stfamod/fine-tuned-bert-financial-sentiment-analysis") model = AutoModelForSequenceClassification.from_pretrained("stfamod/fine-tuned-bert-financial-sentiment-analysis") - Notebooks
- Google Colab
- Kaggle
Model Overview:
This NLP model is fine-tuned with a focus on analyzing sentiment in financial text and news headlines. It was fine-tuned using the bert-base-uncased model on the financial_phrasebank and auditor_sentiment datasets.
Accuracies:
financial_phrasebank: 0.993
auditor_senitment: 0.974
Training Hyperparameters:
Learning Rate: 2e-05
Train Batch Size: 16
Eval Batch Size: 16
Random Seed: 42
Optimizer: AdamW-betas(0.9, 0.999)
Learning Rate Scheduler: Linear
Number of Epochs: 6
Number of Warmup Steps: 0.2 * Number of Training Steps
How To Use:
from transformers import pipeline
pipe = pipeline("sentiment-analysis", model="mstafam/fine-tuned-bert-financial-sentimental-analysis")
text = "Example company has seen a 5% increase in revenue this quarter."
print(pipe(text))
[{'label': 'Positive', 'score': 0.9993795156478882}]
- Downloads last month
- 9