NeoSapian commited on
Commit
433c6c1
·
verified ·
1 Parent(s): c2a57fe

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +638 -51
README.md CHANGED
@@ -1,100 +1,455 @@
1
 
2
  ---
3
  license: other
 
 
 
 
4
  tags:
5
- - finance
6
- - classification
7
- - calibrated-probabilities
8
- - system-one
9
- - typed-decisions
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
- # Nirnay: a typed decision model for finance
 
13
 
14
- **Nirnay** is a 0.8B-parameter finance-oriented typed decision model developed by Sociodynamics AI.
15
 
16
- Full fine-tune of `Qwen/Qwen3.5-0.8B-Base`.
17
 
18
- It does **not generate text**: given a *state* (text or JSON) and typed questions (`choice`, `score`, `noul`), a single forward pass reads next-token logits over option letters only, giving a probability distribution per question.
19
 
20
- Probabilities are temperature-calibrated on a held-out split.
 
 
21
 
22
- Trained on: FinGPT headline yes/no, FinGPT sentiment (FPB/FiQA/tweets/news), Twitter financial news sentiment + topic, FOMC hawkish/dovish, extra tweet/text sentiment sets (if they passed the label audit), and *synthetic* portfolio questions whose labels come from exact formulas (concentration, drift, risk bucket, HHI).
23
 
24
- ## Model
25
 
26
- | Property | Value |
 
 
 
 
27
  |---|---|
28
- | Model name | Nirnay |
29
- | Parameters | 0.8B |
30
- | Base model | Qwen/Qwen3.5-0.8B-Base |
31
- | Architecture | Typed decision classifier |
32
- | Output | Choice, score, and yes/no probabilities |
33
- | Inference | Single forward pass |
34
- | Calibration | Temperature-calibrated |
35
  | Developer | Sociodynamics AI |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- ## Use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  ```python
40
  from huggingface_hub import hf_hub_download
41
  import importlib.util
42
  import sys
43
 
44
- p = hf_hub_download("NeoSapian/nirnay", "jev_common.py")
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- s = importlib.util.spec_from_file_location("jev_common", p)
47
  m = importlib.util.module_from_spec(s)
 
48
  sys.modules["jev_common"] = m
 
49
  s.loader.exec_module(m)
50
 
51
- clf = m.JevClassifier("NeoSapian/nirnay")
 
 
 
 
52
 
53
- print(clf.decide(
 
54
  "Company X cuts full-year guidance and CFO resigns.",
55
  {
56
  "bearish": {
57
  "type": "noul",
58
  "instructions": "Is this news negative for the stock?"
59
  },
 
60
  "topic": {
61
  "type": "choice",
62
  "instructions": "Which topic?",
63
  "criteria": {
64
- "earnings": "results/guidance",
65
- "personnel": "executive changes",
66
- "m&a": "deals"
67
  }
68
  },
 
69
  "severity": {
70
  "type": "score",
71
  "instructions": "How negative is this?",
72
- "levels": ["mild", "moderate", "severe"]
 
 
 
 
73
  }
74
  }
75
- ))
 
 
76
  ```
77
 
78
- ## Limits (read this)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
- * Nirnay classifies **text/state**; it does **not predict returns**.
81
- * Headline labels say what a headline talks about, not what the price will do.
82
- * Portfolio questions are learned from synthetic, rule-labelled data; check arithmetic-heavy answers with real code.
83
- * Calibration is measured in-distribution; expect worse calibration on questions unlike the training tasks.
84
- * Not financial advice.
 
 
 
85
 
86
- ## Held-out test metrics
87
 
88
- | Slice | N | Accuracy | ECE (calibrated) | Brier (calibrated) | NLL (calibrated) |
89
- |---|---:|---:|---:|---:|---:|
90
- | ALL | 7290 | 89.63% | 0.0112 | 0.1431 | 0.2624 |
91
- | Choice | 1424 | 89.54% | 0.0266 | 0.1416 | 0.2748 |
92
- | Score | 2043 | 79.15% | 0.0326 | 0.2827 | 0.5208 |
93
- | Noul | 3823 | 95.27% | 0.0077 | 0.0690 | 0.1196 |
94
 
95
- ## Dataset-wise evaluation
 
 
 
 
96
 
97
- | Dataset | N | Accuracy |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  |---|---:|---:|
99
  | Climate | 41 | 82.93% |
100
  | ESG Environmental | 61 | 95.08% |
@@ -102,8 +457,8 @@ print(clf.decide(
102
  | ESG Social | 72 | 95.83% |
103
  | Financial Classification | 60 | 88.33% |
104
  | FOMC | 112 | 67.86% |
105
- | Headline | 1788 | 97.71% |
106
- | Sentiment | 1383 | 76.28% |
107
  | Synthetic Company | 435 | 98.62% |
108
  | Synthetic Loan | 264 | 98.11% |
109
  | Synthetic Macro | 279 | 100.00% |
@@ -115,20 +470,252 @@ print(clf.decide(
115
  | WCB Time | 117 | 86.32% |
116
  | WCB Uncertain | 127 | 85.04% |
117
 
118
- ## Probability calibration
119
 
120
- | Metric | Raw | Calibrated |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  |---|---:|---:|
122
  | ECE | 0.0505 | 0.0112 |
123
  | Brier Score | 0.1534 | 0.1431 |
124
  | NLL | 0.3040 | 0.2624 |
125
 
126
- Lower ECE, Brier score, and NLL indicate better calibration and probabilistic performance.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
- ## Developer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
  **Nirnay is developed by Sociodynamics AI.**
131
 
 
 
 
 
 
 
 
132
  Hugging Face: https://huggingface.co/NeoSapian/nirnay
133
 
134
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  ---
3
  license: other
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ pipeline_tag: text-classification
8
  tags:
9
+ - nirnay
10
+ - finance
11
+ - financial-ai
12
+ - decision-intelligence
13
+ - typed-decisions
14
+ - financial-classification
15
+ - calibrated-probabilities
16
+ - probability-calibration
17
+ - risk-assessment
18
+ - sentiment-analysis
19
+ - portfolio-analysis
20
+ - qwen
21
+ - 0.8b
22
+ - sociodynamics-ai
23
  ---
24
 
25
+ # Nirnay
26
+ ### A 0.8B Typed Financial Decision Intelligence Model
27
 
28
+ **Nirnay** is a specialized financial decision intelligence model developed by **Sociodynamics AI**.
29
 
30
+ Unlike conventional financial language models designed primarily to generate natural-language responses, Nirnay is designed to interpret financial states and produce structured, typed decisions with associated probability distributions.
31
 
32
+ It uses a specialized classification interface built around three decision types:
33
 
34
+ - **Choice:** Selects the most appropriate option from a predefined set.
35
+ - **Score:** Evaluates a state against predefined ordinal levels.
36
+ - **Noul:** Produces a binary yes/no decision.
37
 
38
+ Nirnay uses next-token logits over predefined option tokens to calculate decision probabilities. It does not require free-form natural-language generation to produce its decisions.
39
 
40
+ The model is fine-tuned from `Qwen/Qwen3.5-0.8B-Base` and uses temperature calibration fitted on a held-out calibration split.
41
 
42
+ ---
43
+
44
+ ## 1. Model Overview
45
+
46
+ | Property | Description |
47
  |---|---|
48
+ | Model | Nirnay |
49
+ | Repository | `NeoSapian/nirnay` |
 
 
 
 
 
50
  | Developer | Sociodynamics AI |
51
+ | Model size | 0.8B parameters |
52
+ | Base model | Qwen/Qwen3.5-0.8B-Base |
53
+ | Training | Full fine-tuning |
54
+ | Domain | Financial decision intelligence |
55
+ | Model category | Typed decision model |
56
+ | Inference | Single forward pass per state |
57
+ | Output | Structured decisions and probabilities |
58
+ | Decision types | Choice, Score, Noul |
59
+ | Calibration | Temperature scaling |
60
+ | Primary language | English |
61
+ | Intended application | Financial text and state classification |
62
+
63
+ ### Design Philosophy
64
+
65
+ Nirnay follows a different approach from generative financial LLMs.
66
+
67
+ A generative model typically receives a financial prompt and produces a textual explanation. Nirnay instead receives a financial state and a set of explicitly defined decision questions.
68
+
69
+ It evaluates the state against those questions and returns probability distributions over the available decision options.
70
+
71
+ This makes the output suitable for downstream systems that need structured classification rather than unrestricted text generation.
72
+
73
+ **Core design:**
74
+
75
+ ```text
76
+ Financial State
77
+ |
78
+ v
79
+ Nirnay 0.8B
80
+ |
81
+ v
82
+ Typed Decision Interface
83
+ |
84
+ +------------------+
85
+ | |
86
+ v v
87
+ Choice Score
88
+ | |
89
+ +---------+--------+
90
+ |
91
+ v
92
+ Noul
93
+ |
94
+ v
95
+ Option-token logits
96
+ |
97
+ v
98
+ Probability outputs
99
+ |
100
+ v
101
+ Temperature calibration
102
+ |
103
+ v
104
+ Structured decisions
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 2. Architecture
110
+
111
+ Nirnay is a full fine-tune of:
112
+
113
+ `Qwen/Qwen3.5-0.8B-Base`
114
+
115
+ The model uses the base model's learned language representations to interpret financial text and structured state descriptions.
116
+
117
+ Its decision interface operates over predefined output tokens rather than relying on unrestricted text generation.
118
+
119
+ ### 2.1 Decision Processing
120
+
121
+ For an input state \(x\), the model processes a question \(q\) and obtains logits over the designated answer tokens.
122
+
123
+ For a choice task with candidate options \(C\):
124
+
125
+ \[
126
+ P(c_i \mid x,q) =
127
+ \frac{\exp(z_i/T)}
128
+ {\sum_{j=1}^{K}\exp(z_j/T)}
129
+ \]
130
+
131
+ Where:
132
+
133
+ - \(z_i\): Logit associated with candidate option \(i\).
134
+ - \(T\): Calibration temperature.
135
+ - \(K\): Number of candidate options.
136
+ - \(P(c_i \mid x,q)\): Probability assigned to the candidate.
137
+
138
+ The selected decision is:
139
+
140
+ \[
141
+ \hat{c} = \arg\max_{c_i} P(c_i \mid x,q)
142
+ \]
143
+
144
+ Temperature calibration adjusts the probability distribution to improve agreement between predicted confidence and observed accuracy.
145
 
146
+ ### 2.2 Typed Decision Interfaces
147
+
148
+ #### A. Choice
149
+
150
+ Selects one option from a predefined collection.
151
+
152
+ Example:
153
+
154
+ ```json
155
+ {
156
+ "type": "choice",
157
+ "instructions": "Which topic does this headline describe?",
158
+ "criteria": {
159
+ "earnings": "Financial results and guidance",
160
+ "personnel": "Executive changes",
161
+ "m&a": "Mergers and acquisitions"
162
+ }
163
+ }
164
+ ```
165
+
166
+ Possible applications:
167
+
168
+ - Financial news categorization
169
+ - Event classification
170
+ - Economic topic identification
171
+ - Market event classification
172
+
173
+ #### B. Score
174
+
175
+ Classifies an input into predefined ordinal levels.
176
+
177
+ Example:
178
+
179
+ ```json
180
+ {
181
+ "type": "score",
182
+ "instructions": "How negative is this financial news?",
183
+ "levels": [
184
+ "mild",
185
+ "moderate",
186
+ "severe"
187
+ ]
188
+ }
189
+ ```
190
+
191
+ Possible applications:
192
+
193
+ - News severity classification
194
+ - Financial risk categorization
195
+ - Sentiment intensity assessment
196
+ - Event impact categorization
197
+
198
+ The score represents a selected category, not a calibrated numerical probability of a future market outcome.
199
+
200
+ #### C. Noul
201
+
202
+ A binary decision interface for yes/no questions.
203
+
204
+ Example:
205
+
206
+ ```json
207
+ {
208
+ "type": "noul",
209
+ "instructions": "Is this news negative for the stock?"
210
+ }
211
+ ```
212
+
213
+ Possible applications:
214
+
215
+ - Positive/negative news classification
216
+ - Binary financial event classification
217
+ - Rule-based screening support
218
+ - Financial text evaluation
219
+
220
+ ---
221
+
222
+ ## 3. Training Data
223
+
224
+ Nirnay was trained using a combination of financial classification datasets and synthetic, rule-labelled decision tasks.
225
+
226
+ The training data includes:
227
+
228
+ | Dataset category | Training objective |
229
+ |---|---|
230
+ | FinGPT Headline | Financial headline yes/no classification |
231
+ | FinGPT Sentiment | Financial sentiment classification |
232
+ | FPB | Financial phrase sentiment |
233
+ | FiQA | Financial question and sentiment tasks |
234
+ | Twitter Financial News | Financial sentiment and topic classification |
235
+ | FOMC | Hawkish/dovish classification |
236
+ | Extra Tweet/Text Sets | Additional financial text classification |
237
+ | Synthetic Company | Formula-based company assessments |
238
+ | Synthetic Loan | Rule-labelled loan assessments |
239
+ | Synthetic Macro | Rule-labelled macroeconomic assessments |
240
+ | Synthetic Portfolio | Portfolio concentration, drift, risk buckets and HHI |
241
+
242
+ Additional tweet and text datasets were included only when they passed the label audit.
243
+
244
+ ### 3.1 Real-World Financial Text
245
+
246
+ The model learns patterns from financial headlines, news, sentiment-labelled text, social media content, and monetary-policy-related classifications.
247
+
248
+ These tasks support financial text understanding and classification.
249
+
250
+ ### 3.2 Synthetic Decision Data
251
+
252
+ Synthetic datasets provide explicitly defined decision tasks with labels generated using deterministic rules or mathematical formulas.
253
+
254
+ Portfolio-related synthetic tasks include:
255
+
256
+ - Portfolio concentration
257
+ - Portfolio drift
258
+ - Risk bucket classification
259
+ - Herfindahl-Hirschman Index (HHI)
260
+
261
+ Synthetic labels allow the model to learn structured mappings between numerical states and decision categories.
262
+
263
+ However, performance on synthetic tasks should not be interpreted as equivalent to performance on real-world financial decision-making.
264
+
265
+ ---
266
+
267
+ ## 4. Inference
268
+
269
+ Nirnay provides a typed decision interface through `JevClassifier`.
270
+
271
+ It does not use conventional text-generation inference for its primary decision outputs.
272
+
273
+ ### 4.1 Installation
274
+
275
+ ```bash
276
+ pip install -U transformers torch huggingface_hub
277
+ ```
278
+
279
+ ### 4.2 Basic Usage
280
 
281
  ```python
282
  from huggingface_hub import hf_hub_download
283
  import importlib.util
284
  import sys
285
 
286
+ MODEL_ID = "NeoSapian/nirnay"
287
+
288
+ # Download decision interface
289
+ p = hf_hub_download(
290
+ repo_id=MODEL_ID,
291
+ filename="jev_common.py"
292
+ )
293
+
294
+ # Load module
295
+ s = importlib.util.spec_from_file_location(
296
+ "jev_common",
297
+ p
298
+ )
299
 
 
300
  m = importlib.util.module_from_spec(s)
301
+
302
  sys.modules["jev_common"] = m
303
+
304
  s.loader.exec_module(m)
305
 
306
+ # Initialize classifier
307
+ clf = m.JevClassifier(MODEL_ID)
308
+ ```
309
+
310
+ ### 4.3 Multi-Question Financial Evaluation
311
 
312
+ ```python
313
+ result = clf.decide(
314
  "Company X cuts full-year guidance and CFO resigns.",
315
  {
316
  "bearish": {
317
  "type": "noul",
318
  "instructions": "Is this news negative for the stock?"
319
  },
320
+
321
  "topic": {
322
  "type": "choice",
323
  "instructions": "Which topic?",
324
  "criteria": {
325
+ "earnings": "Results and financial guidance",
326
+ "personnel": "Executive changes",
327
+ "m&a": "Mergers and acquisitions"
328
  }
329
  },
330
+
331
  "severity": {
332
  "type": "score",
333
  "instructions": "How negative is this?",
334
+ "levels": [
335
+ "mild",
336
+ "moderate",
337
+ "severe"
338
+ ]
339
  }
340
  }
341
+ )
342
+
343
+ print(result)
344
  ```
345
 
346
+ ### 4.4 Structured State Evaluation
347
+
348
+ Nirnay can evaluate text or JSON-formatted state descriptions.
349
+
350
+ Example:
351
+
352
+ ```python
353
+ portfolio_state = {
354
+ "portfolio_value": 100000,
355
+ "cash_percentage": 12,
356
+ "largest_holding_percentage": 38,
357
+ "sector_exposure": {
358
+ "technology": 52,
359
+ "finance": 25,
360
+ "healthcare": 15,
361
+ "other": 8
362
+ }
363
+ }
364
+
365
+ result = clf.decide(
366
+ str(portfolio_state),
367
+ {
368
+ "concentration": {
369
+ "type": "choice",
370
+ "instructions": "Classify the portfolio concentration.",
371
+ "criteria": {
372
+ "low": "Low concentration",
373
+ "moderate": "Moderate concentration",
374
+ "high": "High concentration"
375
+ }
376
+ }
377
+ }
378
+ )
379
+
380
+ print(result)
381
+ ```
382
+
383
+ This example demonstrates the decision interface. The reliability of a portfolio assessment depends on the training distribution and should be independently validated against exact calculations.
384
+
385
+ ---
386
+
387
+ ## 5. Evaluation Results
388
+
389
+ Nirnay was evaluated on a held-out test set containing 7,290 examples.
390
+
391
+ The evaluation covers overall accuracy, expected calibration error (ECE), Brier score, and negative log-likelihood (NLL).
392
+
393
+ ### 5.1 Overall Performance
394
+
395
+ | Metric | Raw | Calibrated |
396
+ |---|---:|---:|
397
+ | Accuracy | 89.63% | 89.63% |
398
+ | ECE | 0.0505 | 0.0112 |
399
+ | Brier Score | 0.1534 | 0.1431 |
400
+ | NLL | 0.3040 | 0.2624 |
401
+
402
+ <details>
403
+ <summary>Full overall evaluation</summary>
404
 
405
+ - Total evaluation examples: 7,290
406
+ - Raw accuracy: 89.63%
407
+ - Raw ECE: 0.0505
408
+ - Calibrated ECE: 0.0112
409
+ - Raw Brier: 0.1534
410
+ - Calibrated Brier: 0.1431
411
+ - Raw NLL: 0.3040
412
+ - Calibrated NLL: 0.2624
413
 
414
+ </details>
415
 
416
+ ### 5.2 Performance by Decision Type
 
 
 
 
 
417
 
418
+ | Decision type | Samples | Accuracy | Raw ECE | Calibrated ECE |
419
+ |---|---:|---:|---:|---:|
420
+ | Choice | 1,424 | 89.54% | 0.0570 | 0.0266 |
421
+ | Score | 2,043 | 79.15% | 0.0898 | 0.0326 |
422
+ | Noul | 3,823 | 95.27% | 0.0278 | 0.0077 |
423
 
424
+ #### Decision-type observations
425
+
426
+ **Choice — 89.54%**
427
+
428
+ The model demonstrates strong performance in selecting among predefined financial categories.
429
+
430
+ **Score — 79.15%**
431
+
432
+ Ordinal classification is more challenging than binary classification. This remains an area for further improvement.
433
+
434
+ **Noul — 95.27%**
435
+
436
+ Binary decision classification achieves the highest accuracy among the three evaluated decision types.
437
+
438
+ ### 5.3 Complete Decision-Type Metrics
439
+
440
+ | Type | Brier Raw | Brier Calibrated | NLL Raw | NLL Calibrated |
441
+ |---|---:|---:|---:|---:|
442
+ | Choice | 0.1521 | 0.1416 | 0.3135 | 0.2748 |
443
+ | Score | 0.3022 | 0.2827 | 0.5894 | 0.5208 |
444
+ | Noul | 0.0744 | 0.0690 | 0.1478 | 0.1196 |
445
+
446
+ ---
447
+
448
+ ## 6. Dataset-Wise Evaluation
449
+
450
+ The following table reports the held-out evaluation results by source category.
451
+
452
+ | Dataset | Samples | Accuracy |
453
  |---|---:|---:|
454
  | Climate | 41 | 82.93% |
455
  | ESG Environmental | 61 | 95.08% |
 
457
  | ESG Social | 72 | 95.83% |
458
  | Financial Classification | 60 | 88.33% |
459
  | FOMC | 112 | 67.86% |
460
+ | Headline | 1,788 | 97.71% |
461
+ | Sentiment | 1,383 | 76.28% |
462
  | Synthetic Company | 435 | 98.62% |
463
  | Synthetic Loan | 264 | 98.11% |
464
  | Synthetic Macro | 279 | 100.00% |
 
470
  | WCB Time | 117 | 86.32% |
471
  | WCB Uncertain | 127 | 85.04% |
472
 
473
+ ### 6.1 Interpretation
474
 
475
+ The results show different performance levels across financial classification tasks.
476
+
477
+ Notable observations:
478
+
479
+ - Headline classification achieves 97.71% accuracy.
480
+ - Synthetic macro classification achieves 100% accuracy.
481
+ - Synthetic portfolio classification achieves 97.34% accuracy.
482
+ - Financial sentiment classification achieves 76.28%.
483
+ - FOMC classification achieves 67.86%.
484
+ - WCB classification achieves 66.67%.
485
+
486
+ The synthetic datasets have formula-generated or rule-generated labels and should be considered separately from real-world financial text benchmarks.
487
+
488
+ Some dataset slices are small. Their accuracy values should not be interpreted as stable estimates of generalization performance.
489
+
490
+ ---
491
+
492
+ ## 7. Probability Calibration
493
+
494
+ An important component of Nirnay is probability calibration.
495
+
496
+ A classification model can achieve high accuracy while producing poorly calibrated confidence values.
497
+
498
+ For example, a model that predicts 90% confidence on 100 decisions should ideally be correct approximately 90 times.
499
+
500
+ Nirnay uses temperature scaling to adjust the distribution of output probabilities.
501
+
502
+ ### 7.1 Calibration Results
503
+
504
+ | Metric | Before Calibration | After Calibration |
505
  |---|---:|---:|
506
  | ECE | 0.0505 | 0.0112 |
507
  | Brier Score | 0.1534 | 0.1431 |
508
  | NLL | 0.3040 | 0.2624 |
509
 
510
+ ### 7.2 What These Metrics Mean
511
+
512
+ **Expected Calibration Error (ECE)**
513
+
514
+ Measures the difference between predicted confidence and observed accuracy across confidence groups.
515
+
516
+ Lower is better.
517
+
518
+ **Brier Score**
519
+
520
+ Measures the squared error between predicted probabilities and actual outcomes.
521
+
522
+ Lower is better.
523
+
524
+ **Negative Log-Likelihood (NLL)**
525
+
526
+ Measures how much probability the model assigns to the correct outcomes.
527
+
528
+ Lower is better.
529
+
530
+ ### 7.3 Calibration Limitations
531
+
532
+ Calibration was measured on a held-out distribution.
533
+
534
+ Performance may deteriorate when the model receives:
535
+
536
+ - New financial domains
537
+ - Different question formats
538
+ - Unseen financial instruments
539
+ - Distribution-shifted market conditions
540
+ - Questions outside the training tasks
541
+
542
+ Calibration does not establish that the model understands future market behavior or produces reliable investment probabilities.
543
+
544
+ ---
545
+
546
+ ## 8. Intended Applications
547
+
548
+ Nirnay is intended to serve as a structured decision component inside larger financial software systems.
549
+
550
+ Potential applications include:
551
+
552
+ ### Financial News Intelligence
553
+
554
+ - Headline classification
555
+ - Financial sentiment classification
556
+ - Event identification
557
+ - News topic categorization
558
+ - Binary news assessments
559
+
560
+ ### Financial Risk Classification
561
+
562
+ - Predefined risk-category classification
563
+ - Ordinal severity assessment
564
+ - Portfolio state categorization
565
+ - Structured risk-screening workflows
566
+
567
+ ### Portfolio Analytics
568
+
569
+ - Portfolio concentration classification
570
+ - Portfolio drift categorization
571
+ - HHI-based assessment
572
+ - Rule-labelled portfolio decision tasks
573
+
574
+ For arithmetic-heavy portfolio calculations, use deterministic financial computation and use Nirnay as a classification layer.
575
+
576
+ ### Financial Decision Pipelines
577
+
578
+ Nirnay can be integrated into pipelines that combine:
579
+
580
+ 1. Financial data collection
581
+ 2. State construction
582
+ 3. Typed model decisions
583
+ 4. Probability interpretation
584
+ 5. Independent rule validation
585
+ 6. Downstream application logic
586
+
587
+ ---
588
 
589
+ ## 9. What Nirnay Is Not
590
+
591
+ Nirnay is not a conventional generative financial chatbot.
592
+
593
+ It is not designed to:
594
+
595
+ - Generate unrestricted financial explanations.
596
+ - Predict stock prices or market returns.
597
+ - Forecast future asset performance.
598
+ - Guarantee profitable investment decisions.
599
+ - Replace financial analysts.
600
+ - Replace deterministic portfolio calculations.
601
+ - Provide personalized investment advice.
602
+
603
+ A negative headline classification does not mean that a stock price will fall.
604
+
605
+ A high-risk portfolio classification does not establish that the portfolio will incur a loss.
606
+
607
+ The model evaluates the supplied state against a defined classification question.
608
+
609
+ ---
610
+
611
+ ## 10. Limitations and Responsible Use
612
+
613
+ Users should consider the following limitations before deploying Nirnay.
614
+
615
+ **Training distribution**
616
+
617
+ The model's performance depends on the similarity between deployment data and training data.
618
+
619
+ **Synthetic data**
620
+
621
+ Portfolio and other synthetic tasks use rule-generated labels. High accuracy on those tasks does not independently establish real-world financial expertise.
622
+
623
+ **Calibration**
624
+
625
+ Probability calibration is distribution-dependent and may degrade under distribution shift.
626
+
627
+ **Arithmetic**
628
+
629
+ Exact financial calculations should be performed using deterministic code.
630
+
631
+ **Decision definitions**
632
+
633
+ Choice and score outputs depend on the criteria and levels supplied by the user.
634
+
635
+ **Financial safety**
636
+
637
+ Nirnay should be used as a decision-support component, not as an autonomous investment authority.
638
+
639
+ Always independently validate high-impact financial decisions.
640
+
641
+ ---
642
+
643
+ ## 11. Deployment
644
+
645
+ Nirnay is hosted on Hugging Face.
646
+
647
+ **Model repository:**
648
+
649
+ https://huggingface.co/NeoSapian/nirnay
650
+
651
+ The repository contains the model implementation and supporting files required by the inference interface.
652
+
653
+ For deployment, use the provided `jev_common.py` implementation rather than assuming the model is compatible with a generic text-generation pipeline.
654
+
655
+ ---
656
+
657
+ ## 12. Research and Development
658
+
659
+ Nirnay explores a specialized model architecture and inference approach for structured financial decision-making.
660
+
661
+ Its development focuses on:
662
+
663
+ - Compact financial decision models
664
+ - Typed question interfaces
665
+ - Structured classification
666
+ - Probability calibration
667
+ - Financial dataset auditing
668
+ - Synthetic rule-labelled decision tasks
669
+ - Efficient decision inference
670
+
671
+ Future development directions may include:
672
+
673
+ - Broader financial domain coverage
674
+ - Improved FOMC classification
675
+ - Better financial sentiment classification
676
+ - Out-of-distribution evaluation
677
+ - Temporal validation
678
+ - More robust calibration
679
+ - Real-world portfolio decision benchmarks
680
+ - Multi-source financial state evaluation
681
+
682
+ These are development directions, not claims about currently implemented capabilities.
683
+
684
+ ---
685
+
686
+ ## 13. Developer
687
+
688
+ ### Sociodynamics AI
689
 
690
  **Nirnay is developed by Sociodynamics AI.**
691
 
692
+ Nirnay is part of the organization's research into compact specialized AI systems and structured decision intelligence.
693
+
694
+ **Model:** Nirnay
695
+ **Parameters:** 0.8B
696
+ **Domain:** Financial Decision Intelligence
697
+ **Organization:** Sociodynamics AI
698
+
699
  Hugging Face: https://huggingface.co/NeoSapian/nirnay
700
 
701
  ---
702
+
703
+ ## 14. License and Disclaimer
704
+
705
+ The model is distributed under the license specified in the repository.
706
+
707
+ The underlying base model and its licensing terms must also be respected.
708
+
709
+ This model is provided for research, experimentation, and decision-support applications.
710
+
711
+ It does not constitute financial, investment, legal, or tax advice.
712
+
713
+ The developers make no guarantee regarding the accuracy of individual decisions, future market performance, or financial outcomes.
714
+
715
+ Users are responsible for validating model outputs before using them in financial applications.
716
+
717
+ ---
718
+
719
+ **Nirnay — Structured Intelligence for Financial Decisions.**
720
+
721
+ Developed by Sociodynamics AI.