--- language: - en license: apache-2.0 library_name: transformers pipeline_tag: text-classification tags: - system-one - decision-model - fast-inference - calibration - qwen2.5 - distillation - s1mb base_model: Qwen/Qwen2.5-0.5B datasets: - SargeDev/jev-distill-corpus-v3 - hotchpotch/S1MB-english-v1 metrics: - brier_score - accuracy model-index: - name: Nirnay-0.5B results: - task: type: text-classification name: System One Decision Making dataset: name: S1MB (System One Mosaic Benchmark) English v1 type: hotchpotch/S1MB-english-v1 metrics: - name: S1MB Task Average type: s1mb_task_avg value: 8.97 - name: Noul (Binary Verification) type: s1mb_noul value: 15.79 - name: Choice (Routing) type: s1mb_choice value: 10.82 --- # ⚡ Nirnay (निर्णय) - 0.5B (v1.0) > **A fast, calibrated "System One" decision model powered by Qwen2.5-0.5B.** [![Hugging Face Space](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Live%20Demo-blue.svg)](https://huggingface.co/spaces/ftpxain/nirnay-demo) [![GitHub Repository](https://img.shields.io/badge/GitHub-Repository-blue.svg?logo=github)](https://github.com/Ronak-jain-afk/Nirnay) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Model Size: 494M](https://img.shields.io/badge/Parameters-494M-green.svg)](https://huggingface.co/Qwen/Qwen2.5-0.5B) [![Inference Latency: <28ms](https://img.shields.io/badge/Latency-%3C28ms-brightgreen.svg)]() [![S1MB English v1: 8.97](https://img.shields.io/badge/S1MB%20Task%20Avg-8.97-orange.svg)](https://huggingface.co/blog/hotchpotch/system-one-mosaic-benchmark) 🚀 **[Try the Live Interactive Demo Space](https://huggingface.co/spaces/ftpxain/nirnay-demo)** | 💻 **[GitHub Repository & Code](https://github.com/Ronak-jain-afk/Nirnay)** --- ## What is Nirnay? In cognitive science, **System 1** describes fast, instinctive, and automatic decision-making, while **System 2** refers to slow, deliberative reasoning. Standard LLMs act like System 2: to make a simple routing or verification decision, they generate dozens of tokens autoregressively, taking hundreds of milliseconds. Nirnay bypasses token generation entirely: ``` State (Context / Text) ──┐ Question ──┼──> [Qwen2.5-0.5B Backbone (BF16)] ──> Option Linear Projection ──> Calibrated Distribution Options [A, B, ...] ──┘ (Last Token Hidden State 896) (Direct Option Weights) (P(A), P(B), ...) ``` By extracting the final token hidden state and projecting directly onto candidate option weights, Nirnay eliminates the 152k-vocabulary LM head projection and KV-cache overhead, achieving **30+ decisions per second** at $<28\text{ ms}$ latency and just **1.4 GB VRAM**. --- ## Official S1MB Benchmark Results (English v1) Nirnay was evaluated across the complete **137-benchmark suite (14,009 test cases)** of the official [System One Mosaic Benchmark (S1MB)](https://huggingface.co/blog/hotchpotch/system-one-mosaic-benchmark) created by Yuichi Tateno (`hotchpotch`): | Decision Family | Benchmarks | Nirnay-0.5B (`v1.0` Final) | Baseline-Adjusted Skill | | :--- | :---: | :---: | :--- | | **Noul** (Binary Verification) | 59 tasks | **15.79** | Safety gates, assertions, yes/no checks | | **Choice** (Candidate Routing) | 57 tasks | **10.82** | Multi-class routing, triage, tool selection | | **Score** (Ordinal Rating) | 21 tasks | 0.29 | Discrete continuous criteria rating (0–5) | | **Official S1MB Task Avg** | **137 tasks** | **8.97** | Equal-weighted macro-average | ### S1MB Published Leaderboard Standing | Model | Parameters | S1MB Task Avg | Noul (Binary) | Choice (Routing) | Score (Rating) | | :--- | :---: | :---: | :---: | :---: | :---: | | `laya` | 421M | 13.36 | 20.19 | 16.31 | 3.58 | | `laya-multilingual` | 322M | 9.28 | 14.01 | 13.03 | 0.79 | | **Nirnay-0.5B-v1.0 (Ours)** | **494M** | **8.97** | **15.79** | **10.82** | **0.29** | | `minojev` | 1.72B | 7.93 | 8.57 | 14.56 | 0.67 | | `JevForge-0.8B` | 854M | 1.92 | 0.00 | 5.75 | 0.00 | > **Key Milestone:** Nirnay-0.5B **surpasses `minojev` (1.72B)** across the entire S1MB benchmark suite (**8.97** vs **7.93**) and **outperforms `laya-multilingual` on Binary Verification (`noul`)** (**15.79** vs **14.01**). --- ## Temperature Calibration & Distillation Metrics Trained on 655,806 teacher-distilled decisions from `SargeDev/jev-distill-corpus-v3`: * **Top-1 Accuracy:** `84.88%` across 5,000 calibration samples * **Brier Score:** `0.0252` (extremely low quadratic error) * **Optimal Temperature ($\tau$):** `1.0456` (included in `calibration_params.json`) * **Mean Latency:** `32.37 ms` (P95: `43.77 ms`) --- ## Quickstart: Python Inference ### Using Transformers Directly ```python import torch import torch.nn.functional as F from transformers import AutoModelForCausalLM, AutoTokenizer MODEL_ID = "ftpxain/nirnay-0.5b" device = "cuda" if torch.cuda.is_available() else "cpu" dtype = torch.bfloat16 if (device == "cuda" and torch.cuda.is_bf16_supported()) else torch.float32 tokenizer = AutoTokenizer.from_pretrained(MODEL_ID) model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype=dtype).to(device) model.eval() # Decision input state = "Database replica lag spiked to 45 seconds during flash sale traffic." question = "Should incoming read traffic be rerouted to read-replicas immediately?" options = ["false", "true"] # Format prompt OPTION_LETTERS = ["A", "B", "C", "D", "E", "F"] opts_str = "\n".join([f"{OPTION_LETTERS[i]}: {opt}" for i, opt in enumerate(options)]) prompt = ( f"<|im_start|>system\n" f"You are Nirnay, a fast calibrated decision model. Output the single letter corresponding to the best decision.<|im_end|>\n" f"<|im_start|>user\n" f"State:\n{state}\n\n" f"Question:\n{question}\n\n" f"Options:\n{opts_str}\n\n" f"Decision:<|im_end|>\n" f"<|im_start|>assistant\n" ) # Single forward pass inp = tokenizer(prompt, return_tensors="pt").to(device) option_token_ids = [tokenizer.encode(OPTION_LETTERS[i], add_special_tokens=False)[-1] for i in range(len(options))] with torch.no_grad(): out = model(**inp) logits = out.logits[0, -1, option_token_ids] probs = F.softmax(logits, dim=-1).cpu().numpy() for opt, p in zip(options, probs): print(f"Option '{opt}': {p*100:.2f}%") ``` --- ## Citation & Acknowledgments If you use Nirnay in your work, please cite: ```bibtex @software{nirnay2026, author = {Ronak & Contributors}, title = {Nirnay: Fast, Calibrated System One Decision Model}, year = {2026}, url = {https://github.com/Ronak-jain-afk/Nirnay} } ``` * **System One Mosaic Benchmark (S1MB)** by Yuichi Tateno (`hotchpotch`): [GitHub](https://github.com/hotchpotch/S1MB) * **Distillation Corpus** by SargeDev: [`SargeDev/jev-distill-corpus-v3`](https://huggingface.co/datasets/SargeDev/jev-distill-corpus-v3) * **Qwen2.5-0.5B** by Alibaba Cloud: [`Qwen/Qwen2.5-0.5B`](https://huggingface.co/Qwen/Qwen2.5-0.5B)