Text Classification
Transformers
Safetensors
English
roberta
financial-nlp
sentiment-analysis
distilroberta
active-learning
Eval Results (legacy)
text-embeddings-inference
Instructions to use OMCHOKSI108/FineStream with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OMCHOKSI108/FineStream with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="OMCHOKSI108/FineStream")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("OMCHOKSI108/FineStream") model = AutoModelForSequenceClassification.from_pretrained("OMCHOKSI108/FineStream") - Notebooks
- Google Colab
- Kaggle
| language: en | |
| license: apache-2.0 | |
| tags: | |
| - financial-nlp | |
| - sentiment-analysis | |
| - distilroberta | |
| - active-learning | |
| - transformers | |
| datasets: | |
| - financial_phrasebank | |
| metrics: | |
| - accuracy | |
| - f1 | |
| model-index: | |
| - name: hitenkatariya/FinStream | |
| results: | |
| - task: | |
| type: text-classification | |
| dataset: | |
| name: Financial PhraseBank | |
| type: financial_phrasebank | |
| metrics: | |
| - type: accuracy | |
| value: 0.8680 | |
| # π FinStream: Financial Sentiment Analysis | |
| > Fine-tuned `distilroberta-base` for 3-class financial sentiment classification. | |
| > Part of the **FinStream** active learning pipeline. | |
| ## Model Description | |
| FinStream is a **DistilRoBERTa-base** model fine-tuned on the Financial PhraseBank dataset | |
| (`sentences_allagree` subset) to classify financial news into three sentiment classes: | |
| | Label | ID | Meaning | | |
| |-------|----|---------| | |
| | π» bearish | 0 | Negative market outlook | | |
| | π neutral | 1 | No strong directional signal | | |
| | π bullish | 2 | Positive market outlook | | |
| ## Performance | |
| | Metric | Score | | |
| |--------|-------| | |
| | Test Accuracy | 0.8680 | | |
| | Training Set | Financial PhraseBank (all_agree) | | |
| ## Usage | |
| ```python | |
| from transformers import pipeline | |
| classifier = pipeline( | |
| 'text-classification', | |
| model='OMCHOKSI108/FinStream', | |
| ) | |
| result = classifier("Federal Reserve signals interest rate cuts.") | |
| print(result) # [{'label': 'bullish', 'score': 0.94}] | |
| ``` | |
| ## Training | |
| - **Base Model:** `distilroberta-base` | |
| - **Dataset:** Financial PhraseBank (`sentences_allagree`) | |
| - **Framework:** Hugging Face Transformers + Trainer API | |
| - **Optimizer:** AdamW with linear warmup | |
| - **Mixed Precision:** FP16 (on GPU) | |
| - **Early Stopping:** Patience = 3 (monitoring eval_f1) | |
| ## Authors | |
| |**OM Choksi** | |
| Built as part of the FinStream Active Learning Pipeline β a portfolio-grade financial NLP project. | |