OMCHOKSI108 commited on
Commit
12c29f5
·
verified ·
1 Parent(s): 0c3068b

Upload om model files

Browse files
Files changed (6) hide show
  1. README.md +78 -0
  2. config.json +39 -0
  3. eval_metrics.json +9 -0
  4. model.safetensors +3 -0
  5. tokenizer.json +0 -0
  6. tokenizer_config.json +16 -0
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ tags:
5
+ - financial-nlp
6
+ - sentiment-analysis
7
+ - distilroberta
8
+ - active-learning
9
+ - transformers
10
+ datasets:
11
+ - financial_phrasebank
12
+ metrics:
13
+ - accuracy
14
+ - f1
15
+ model-index:
16
+ - name: hitenkatariya/FinStream
17
+ results:
18
+ - task:
19
+ type: text-classification
20
+ dataset:
21
+ name: Financial PhraseBank
22
+ type: financial_phrasebank
23
+ metrics:
24
+ - type: accuracy
25
+ value: 0.8680
26
+ ---
27
+
28
+ # 📈 FinStream: Financial Sentiment Analysis
29
+
30
+ > Fine-tuned `distilroberta-base` for 3-class financial sentiment classification.
31
+ > Part of the **FinStream** active learning pipeline.
32
+
33
+ ## Model Description
34
+
35
+ FinStream is a **DistilRoBERTa-base** model fine-tuned on the Financial PhraseBank dataset
36
+ (`sentences_allagree` subset) to classify financial news into three sentiment classes:
37
+
38
+ | Label | ID | Meaning |
39
+ |-------|----|---------|
40
+ | 🐻 bearish | 0 | Negative market outlook |
41
+ | 😐 neutral | 1 | No strong directional signal |
42
+ | 🐂 bullish | 2 | Positive market outlook |
43
+
44
+ ## Performance
45
+
46
+ | Metric | Score |
47
+ |--------|-------|
48
+ | Test Accuracy | 0.8680 |
49
+ | Training Set | Financial PhraseBank (all_agree) |
50
+
51
+ ## Usage
52
+
53
+ ```python
54
+ from transformers import pipeline
55
+
56
+ classifier = pipeline(
57
+ 'text-classification',
58
+ model='hitenkatariya/FinStream',
59
+ )
60
+
61
+ result = classifier("Federal Reserve signals interest rate cuts.")
62
+ print(result) # [{'label': 'bullish', 'score': 0.94}]
63
+ ```
64
+
65
+ ## Training
66
+
67
+ - **Base Model:** `distilroberta-base`
68
+ - **Dataset:** Financial PhraseBank (`sentences_allagree`)
69
+ - **Framework:** Hugging Face Transformers + Trainer API
70
+ - **Optimizer:** AdamW with linear warmup
71
+ - **Mixed Precision:** FP16 (on GPU)
72
+ - **Early Stopping:** Patience = 3 (monitoring eval_f1)
73
+
74
+ ## Authors
75
+
76
+ **Hiten Katariya** | **OM Choksi**
77
+
78
+ Built as part of the FinStream Active Learning Pipeline — a portfolio-grade financial NLP project.
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "RobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "bearish",
16
+ "1": "neutral",
17
+ "2": "bullish"
18
+ },
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 3072,
21
+ "is_decoder": false,
22
+ "label2id": {
23
+ "bearish": 0,
24
+ "bullish": 2,
25
+ "neutral": 1
26
+ },
27
+ "layer_norm_eps": 1e-05,
28
+ "max_position_embeddings": 514,
29
+ "model_type": "roberta",
30
+ "num_attention_heads": 12,
31
+ "num_hidden_layers": 6,
32
+ "pad_token_id": 1,
33
+ "problem_type": "single_label_classification",
34
+ "tie_word_embeddings": true,
35
+ "transformers_version": "5.0.0",
36
+ "type_vocab_size": 1,
37
+ "use_cache": false,
38
+ "vocab_size": 50265
39
+ }
eval_metrics.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_accuracy": 0.8679504814305364,
3
+ "timestamp": "2026-05-26T07:10:52.344448",
4
+ "base_model": "distilroberta-base",
5
+ "dataset": "financial_phrasebank/sentences_allagree",
6
+ "num_labels": 3,
7
+ "max_length": 128,
8
+ "seed": 42
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31667f355505bb2f76dc4e966015947974bcabf97737445697ec75915e12ce42
3
+ size 328495340
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<s>",
5
+ "cls_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "errors": "replace",
8
+ "is_local": false,
9
+ "mask_token": "<mask>",
10
+ "model_max_length": 512,
11
+ "pad_token": "<pad>",
12
+ "sep_token": "</s>",
13
+ "tokenizer_class": "RobertaTokenizer",
14
+ "trim_offsets": true,
15
+ "unk_token": "<unk>"
16
+ }