Text Classification
Transformers
Safetensors
PyTorch
qwen2
text-generation
bitsandbytes
4-bit precision
quantized
qwen
decision-making
system-one
reasoning
jev
jevbench
joint-expected-value
classification
agent
fast-inference
text-embeddings-inference
Instructions to use devankit7873/QJev-1.5B-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use devankit7873/QJev-1.5B-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="devankit7873/QJev-1.5B-4bit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("devankit7873/QJev-1.5B-4bit") model = AutoModelForCausalLM.from_pretrained("devankit7873/QJev-1.5B-4bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix: establish correct model tree hierarchy in README metadata
Browse files
README.md
CHANGED
|
@@ -1,349 +1,93 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
base_model:
|
| 4 |
-
library_name: transformers
|
| 5 |
-
tags:
|
| 6 |
-
- transformers
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
-
|
| 28 |
-
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
#
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
[![
|
| 39 |
-
[![
|
| 40 |
-
[![
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
- **
|
| 47 |
-
- **
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
--
|
| 73 |
-
|
| 74 |
-
#
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
| JevBench Metamorphic Dimension | Baseline (Pre-Consistency) | QJev-1.5B (Phase 3 Consistency) | Delta / Gain | Practical Meaning |
|
| 96 |
-
| :--- | :---: | :---: | :---: | :--- |
|
| 97 |
-
| **`BAT.isolation`** | **100.0%** | **100.0%** | **0.0%** | Predictions are completely independent of batching (Zero cross-talk) |
|
| 98 |
-
| **`REP.type`** | 77.1% | **83.3%** | **+6.2%** | Format coherence across multi-choice, boolean, and ordinal score |
|
| 99 |
-
| **`REP.invariance`** | 73.2% | **74.4%** | **+1.2%** | Immune to choice shuffling, key renames, and prompt perturbation |
|
| 100 |
-
| **`LOG.bounds`** | 62.5% | **67.9%** | **+5.4%** | Strict adherence to probabilistic upper/lower bounds |
|
| 101 |
-
| **`CHO.conditioning`** | 41.7% | **56.9%** | **+15.2%** | Removing irrelevant choices preserves odds ratios (Independence) |
|
| 102 |
-
| **`REP.equivariance`** | 48.6% | **55.6%** | **+7.0%** | Symmetrical consistency under prompt transformations |
|
| 103 |
-
| **`MEA.partition`** | 30.7% | **41.1%** | **+10.4%** | Probability mass is preserved across coarsened option partitions |
|
| 104 |
-
| **OVERALL JEVBENCH OFFICIAL (Strict 0.05)** | **58.67%** `[56–61]` | **62.53%** `[60–65]` | **+3.86%** | **Official Benchmark Standard (Places in 4B-model tier)** |
|
| 105 |
-
| **OVERALL JEVBENCH (Relaxed 0.10)** | 60.2% | **71.5%** | **+11.3%** | Lenient consistency threshold |
|
| 106 |
-
|
| 107 |
-
Machine-readable evaluation reports are archived in `reports/jevbench/`.
|
| 108 |
-
|
| 109 |
-
---
|
| 110 |
-
|
| 111 |
-
## 📊 Dataset Benchmark Trajectory (655,806 Samples)
|
| 112 |
-
|
| 113 |
-
Evaluated on fixed 1,500-sample test (in-distribution) and Out-of-Distribution (OOD) benchmark splits from `SargeDev/jev-distill-corpus-v3`:
|
| 114 |
-
|
| 115 |
-
| Metric | Phase 1 (Frozen Backbone Baseline) | Phase 2 (QLoRA Joint Training) | Delta / Improvement |
|
| 116 |
-
| :--- | :---: | :---: | :---: |
|
| 117 |
-
| **OOD Accuracy (`ood`)** | 57.53% | **80.07%** | **+22.54%** |
|
| 118 |
-
| **OOD Total Variation Distance (TVD)** | 0.4607 | **0.2389** | **-48.1% (Calibrated)** |
|
| 119 |
-
| **OOD KL Loss** | 0.7884 | **0.6972** | **-11.6%** |
|
| 120 |
-
| **In-Distribution TVD (`test`)** | 0.1664 | **0.0921** | **-44.6% (Sub-9% deviation)** |
|
| 121 |
-
| **In-Distribution Loss** | 0.1757 | **0.1033** | **-41.2%** |
|
| 122 |
-
| **Inference Latency** | 42.94 ms | **31.49 ms** | **26.7% faster** |
|
| 123 |
-
|
| 124 |
-
---
|
| 125 |
-
|
| 126 |
-
## 📥 How to Download the Model
|
| 127 |
-
|
| 128 |
-
We host full fused weights and modular LoRA adapters on the [Hugging Face Hub](https://huggingface.co/devankit7873/QJev-1.5B).
|
| 129 |
-
|
| 130 |
-
### Method 1: Hugging Face CLI (Fastest)
|
| 131 |
-
```bash
|
| 132 |
-
huggingface-cli download devankit7873/QJev-1.5B --local-dir ./QJev-1.5B
|
| 133 |
-
```
|
| 134 |
-
|
| 135 |
-
### Method 2: Python `snapshot_download`
|
| 136 |
-
```python
|
| 137 |
-
from huggingface_hub import snapshot_download
|
| 138 |
-
|
| 139 |
-
snapshot_download(repo_id="devankit7873/QJev-1.5B", local_dir="./QJev-1.5B")
|
| 140 |
-
```
|
| 141 |
-
|
| 142 |
-
### Method 3: Git LFS Clone
|
| 143 |
-
```bash
|
| 144 |
-
git lfs install
|
| 145 |
-
git clone https://huggingface.co/devankit7873/QJev-1.5B
|
| 146 |
-
```
|
| 147 |
-
|
| 148 |
-
---
|
| 149 |
-
|
| 150 |
-
## 🚀 Quickstart & Usage
|
| 151 |
-
|
| 152 |
-
### 1. Installation
|
| 153 |
-
```bash
|
| 154 |
-
git clone https://github.com/AnkitNayak-dev/QJev-1.5B.git
|
| 155 |
-
cd QJev-1.5B
|
| 156 |
-
pip install -r requirements.txt
|
| 157 |
-
```
|
| 158 |
-
|
| 159 |
-
### 2. 1-Command CLI Decision
|
| 160 |
-
```bash
|
| 161 |
-
python qjev.py --context "Patient has severe chest pain and elevated troponin" --choices "Emergency PCI" "Aspirin" "Wait"
|
| 162 |
-
```
|
| 163 |
-
|
| 164 |
-
### 3. Super Simple Python API (3 Lines of Code)
|
| 165 |
-
```python
|
| 166 |
-
from qjev import QJev
|
| 167 |
-
|
| 168 |
-
# Load ANY edition (Full Standalone, 4-bit Quantized, or LoRA Adapter) in 1 line:
|
| 169 |
-
model = QJev.from_pretrained("devankit7873/QJev-1.5B")
|
| 170 |
-
# Or 4-bit (1.07 GB VRAM): model = QJev.from_pretrained("devankit7873/QJev-1.5B-4bit")
|
| 171 |
-
# Or LoRA (20 MB download): model = QJev.from_pretrained("devankit7873/QJev-1.5B-LoRA")
|
| 172 |
-
|
| 173 |
-
# 1-Line Decision (<35 ms)
|
| 174 |
-
result = model.decide(
|
| 175 |
-
context="Production database primary replica CPU spiked to 100% and connection pool is exhausted.",
|
| 176 |
-
choices=[
|
| 177 |
-
"Trigger immediate automated failover to standby replica",
|
| 178 |
-
"Restart the primary database daemon immediately",
|
| 179 |
-
"Double connection pool limits without scaling compute",
|
| 180 |
-
"Silence alerts and monitor for next 15 minutes"
|
| 181 |
-
]
|
| 182 |
-
)
|
| 183 |
-
|
| 184 |
-
print(f"👉 Recommended Action: {result['best_choice']} ({result['confidence']}%)")
|
| 185 |
-
for choice, prob in result['probabilities'].items():
|
| 186 |
-
print(f" [{prob:>5.2f}%] {choice}")
|
| 187 |
-
```
|
| 188 |
-
|
| 189 |
-
**Expected Output:**
|
| 190 |
-
```text
|
| 191 |
-
👉 Recommended Action: Trigger immediate automated failover to standby replica (88.28%)
|
| 192 |
-
[88.28%] Trigger immediate automated failover to standby replica
|
| 193 |
-
[ 6.54%] Restart the primary database daemon immediately
|
| 194 |
-
[ 4.79%] Double connection pool limits without scaling compute
|
| 195 |
-
[ 0.45%] Silence alerts and monitor for next 15 minutes
|
| 196 |
-
```
|
| 197 |
-
|
| 198 |
-
---
|
| 199 |
-
|
| 200 |
-
## 🌐 Multi-Engine Inference Deployment
|
| 201 |
-
|
| 202 |
-
QJev-1.5B is designed to deploy across **all major LLM serving runtimes**:
|
| 203 |
-
|
| 204 |
-
### 1. vLLM (High-Throughput Production)
|
| 205 |
-
```bash
|
| 206 |
-
# Serve QJev with continuous batching and PagedAttention:
|
| 207 |
-
vllm serve devankit7873/QJev-1.5B --task classify --port 8000
|
| 208 |
-
```
|
| 209 |
-
Query from Python via `qjev.py`:
|
| 210 |
-
```python
|
| 211 |
-
from qjev import QJev
|
| 212 |
-
model = QJev.from_remote("http://localhost:8000")
|
| 213 |
-
result = model.decide(context="Kubernetes node 3 unreachable", choices=["Drain", "Reboot", "Wait"])
|
| 214 |
-
```
|
| 215 |
-
|
| 216 |
-
### 2. Ollama (Local Mac / PC / CPU)
|
| 217 |
-
Create and run locally using the included `Modelfile`:
|
| 218 |
-
```bash
|
| 219 |
-
ollama create qjev-1.5b -f Modelfile
|
| 220 |
-
ollama run qjev-1.5b
|
| 221 |
-
```
|
| 222 |
-
Or query from Python:
|
| 223 |
-
```python
|
| 224 |
-
from qjev import QJev
|
| 225 |
-
model = QJev.from_ollama("http://localhost:11434", model="qjev-1.5b")
|
| 226 |
-
```
|
| 227 |
-
|
| 228 |
-
### 3. llama.cpp / GGUF (Edge Devices & LM Studio)
|
| 229 |
-
Convert to GGUF format using the export tool:
|
| 230 |
-
```bash
|
| 231 |
-
python scripts/export_gguf.py --model-dir export/QJev-1.5B-Phase3 --out-file qjev-1.5b-f16.gguf
|
| 232 |
-
./llama-quantize qjev-1.5b-f16.gguf qjev-1.5b-q4_k_m.gguf Q4_K_M
|
| 233 |
-
```
|
| 234 |
-
|
| 235 |
-
### 4. Unified Microservice Server (`serve.py`)
|
| 236 |
-
Run the all-in-one FastAPI server exposing REST, System One, and OpenAI protocols:
|
| 237 |
-
```bash
|
| 238 |
-
python serve.py --port 8000
|
| 239 |
-
```
|
| 240 |
-
* **REST API:** `POST /v1/decide`
|
| 241 |
-
* **Official Jev Protocol:** `POST /v1/systemone`
|
| 242 |
-
* **OpenAI Drop-In:** `POST /v1/chat/completions`
|
| 243 |
-
|
| 244 |
-
---
|
| 245 |
-
|
| 246 |
-
## 🏗️ Model Architecture & System 1 Paradigm
|
| 247 |
-
|
| 248 |
-
```
|
| 249 |
-
[User Context + Formatted Choices]
|
| 250 |
-
│
|
| 251 |
-
▼
|
| 252 |
-
┌────────────────────────┐
|
| 253 |
-
│ Qwen2.5-1.5B Backbone │ (QLoRA adapted on q, k, v, o projections)
|
| 254 |
-
└───────────┬────────────┘
|
| 255 |
-
│ (Last Hidden State: 1536 dim)
|
| 256 |
-
▼
|
| 257 |
-
┌────────────────────────┐
|
| 258 |
-
│ LayerNorm(1536) │
|
| 259 |
-
└───────────┬────────────┘
|
| 260 |
-
│
|
| 261 |
-
▼
|
| 262 |
-
┌────────────────────────┐
|
| 263 |
-
│ Linear(1536 -> 512) │ (GELU + Dropout 0.1)
|
| 264 |
-
└───────────┬────────────┘
|
| 265 |
-
│
|
| 266 |
-
▼
|
| 267 |
-
┌────────────────────────┐
|
| 268 |
-
│ Linear(512 -> 10) │ (Dynamic Choice Masking)
|
| 269 |
-
└───────────┬────────────┘
|
| 270 |
-
│
|
| 271 |
-
▼
|
| 272 |
-
[Calibrated Softmax Probabilities]
|
| 273 |
-
```
|
| 274 |
-
|
| 275 |
-
---
|
| 276 |
-
|
| 277 |
-
## 💻 Hardware & Training Infrastructure
|
| 278 |
-
|
| 279 |
-
Trained from scratch locally on consumer silicon:
|
| 280 |
-
- **Host System:** HP OMEN Gaming Laptop (Windows 11 Pro 64-bit)
|
| 281 |
-
- **GPU:** NVIDIA GeForce RTX 5060 Laptop GPU (8GB VRAM)
|
| 282 |
-
- **CUDA / Driver:** CUDA 12.8 / Driver 621.24 (CUDA UMD 13.5)
|
| 283 |
-
- **Framework:** PyTorch `2.12.0.dev20260408+cu128`, `transformers 5.22.0`, `peft 0.21.2`
|
| 284 |
-
- **Precision:** Float32 Matmul Precision set to `high` with Tensor Core **TF32** acceleration
|
| 285 |
-
- **VRAM Footprint:** Strictly pegged at **5.90 GB / 8.0 GB VRAM** (0 OOM errors over 655k steps)
|
| 286 |
-
- **Effective Batch Size:** 8 per device $\times$ 4 gradient accumulation = 32
|
| 287 |
-
- **Throughput:** ~11.5–12.0 samples/sec (total ~18.5 GPU compute hours)
|
| 288 |
-
|
| 289 |
-
---
|
| 290 |
-
|
| 291 |
-
## 📁 Repository Structure
|
| 292 |
-
|
| 293 |
-
```text
|
| 294 |
-
├── README.md # Project showcase, benchmarks, and usage
|
| 295 |
-
├── LICENSE # Apache 2.0 open-source license
|
| 296 |
-
├── requirements.txt # Python dependencies
|
| 297 |
-
├── predict.py # 1-click single-pass inference demo
|
| 298 |
-
│
|
| 299 |
-
├── src/ # Core modeling and training pipeline
|
| 300 |
-
│ ├── model.py # MLP Decision Head + Qwen integration
|
| 301 |
-
│ ├── dataset.py # ChatML streaming dataset loader
|
| 302 |
-
│ ├── train.py # Phase 1 baseline training script
|
| 303 |
-
│ ├── train_phase2.py # Phase 2 QLoRA joint training script (655k steps)
|
| 304 |
-
│ └── evaluate.py # Evaluation metrics (TVD, Accuracy, KL loss)
|
| 305 |
-
│
|
| 306 |
-
├── benchmark/ # Evaluation suites
|
| 307 |
-
│ └── run_jevbench.py # Official JevBench metamorphic evaluation runner
|
| 308 |
-
│
|
| 309 |
-
├── reports/ # Complete empirical benchmark records
|
| 310 |
-
│ ├── jevbench_aligned/ # Official JevBench scores (71.5% calibrated)
|
| 311 |
-
│ ├── phase_1/ # Phase 1 baseline evaluation records
|
| 312 |
-
│ └── phase_2/ # Phase 2 evaluations across all 50k checkpoints
|
| 313 |
-
│
|
| 314 |
-
└── scripts/ # Workflow utilities
|
| 315 |
-
├── merge_and_export.py # LoRA fusing and safetensors export
|
| 316 |
-
├── download_data.py # Dataset loader from Hugging Face
|
| 317 |
-
├── download_model.py # Base model downloader
|
| 318 |
-
└── upload_to_hf.py # Automated Hugging Face publisher
|
| 319 |
-
```
|
| 320 |
-
|
| 321 |
-
---
|
| 322 |
-
|
| 323 |
-
## 📈 Telemetry & Tracking
|
| 324 |
-
All training trajectories, step metrics, and evaluations were recorded in real time:
|
| 325 |
-
- **Weights & Biases Dashboard:** [`phase-2-lora-joint-run`](https://forge.coreweave.com/wandb/devankit/qwen-decision-head/runs/phase-2-lora-joint-run)
|
| 326 |
-
- **Source Code & Pipelines:** [github.com/AnkitNayak-dev/QJev-1.5B](https://github.com/AnkitNayak-dev/QJev-1.5B)
|
| 327 |
-
- **Model Weights & Hub:** [huggingface.co/devankit7873/QJev-1.5B](https://huggingface.co/devankit7873/QJev-1.5B)
|
| 328 |
-
|
| 329 |
-
---
|
| 330 |
-
|
| 331 |
-
## 📚 Citation
|
| 332 |
-
|
| 333 |
-
If you use **QJev-1.5B** or its benchmark methodology in your research, please cite:
|
| 334 |
-
|
| 335 |
-
```bibtex
|
| 336 |
-
@misc{nayak2026qjev15b,
|
| 337 |
-
author = {Ankit Nayak},
|
| 338 |
-
title = {QJev-1.5B: High-Speed System 1 JEV Decision Model based on Qwen2.5},
|
| 339 |
-
year = {2026},
|
| 340 |
-
publisher = {GitHub and Hugging Face},
|
| 341 |
-
howpublished = {\url{https://github.com/AnkitNayak-dev/QJev-1.5B}}
|
| 342 |
-
}
|
| 343 |
-
```
|
| 344 |
-
|
| 345 |
-
---
|
| 346 |
-
|
| 347 |
-
## 📄 License
|
| 348 |
-
This model and codebase are released under the **Apache 2.0 License**.
|
| 349 |
-
Base weights are governed by the Alibaba Cloud Qwen License. Distillation corpus is provided by SargeDev (`jev-distill-corpus-v3`). Metamorphic benchmarking powered by JevBench.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: devankit7873/QJev-1.5B
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- transformers
|
| 7 |
+
- bitsandbytes
|
| 8 |
+
- 4-bit
|
| 9 |
+
- quantized
|
| 10 |
+
- pytorch
|
| 11 |
+
- qwen
|
| 12 |
+
- qwen2
|
| 13 |
+
- decision-making
|
| 14 |
+
- system-one
|
| 15 |
+
- reasoning
|
| 16 |
+
- jev
|
| 17 |
+
- jevbench
|
| 18 |
+
- joint-expected-value
|
| 19 |
+
- classification
|
| 20 |
+
- safetensors
|
| 21 |
+
- agent
|
| 22 |
+
- fast-inference
|
| 23 |
+
datasets:
|
| 24 |
+
- SargeDev/jev-distill-corpus-v3
|
| 25 |
+
metrics:
|
| 26 |
+
- accuracy
|
| 27 |
+
- tvd
|
| 28 |
+
- kl_divergence
|
| 29 |
+
pipeline_tag: text-classification
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
<div align="center">
|
| 33 |
+
|
| 34 |
+
# ⚡ QJev-1.5B-4bit: 4-Bit NF4 Quantized Decision Model
|
| 35 |
+
### High-Speed System 1 Decision Engine (1.15 GB Weights • 1.07 GB VRAM)
|
| 36 |
+
|
| 37 |
+
[](https://huggingface.co/devankit7873/QJev-1.5B-4bit)
|
| 38 |
+
[](https://github.com/AnkitNayak-dev/QJev-1.5B)
|
| 39 |
+
[](https://jevbench.github.io/)
|
| 40 |
+
[](LICENSE)
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
### 📦 Part of the QJev Model Family:
|
| 45 |
+
- **Flagship Standalone (Fused):** [devankit7873/QJev-1.5B](https://huggingface.co/devankit7873/QJev-1.5B) (3.08 GB)
|
| 46 |
+
- **Lightweight LoRA Adapter:** [devankit7873/QJev-1.5B-LoRA](https://huggingface.co/devankit7873/QJev-1.5B-LoRA) (20 MB)
|
| 47 |
+
- **4-Bit Quantized:** [devankit7873/QJev-1.5B-4bit](https://huggingface.co/devankit7873/QJev-1.5B-4bit) (1.15 GB, 1.07 GB VRAM)
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
</div>
|
| 52 |
+
|
| 53 |
+
## 💡 Overview
|
| 54 |
+
|
| 55 |
+
**`QJev-1.5B-4bit`** is the **ultra-efficient 4-bit NormalFloat (NF4) quantized release** of `QJev-1.5B`.
|
| 56 |
+
|
| 57 |
+
By compressing the 1.54B parameter transformer into 4-bit precision via `bitsandbytes`, the memory footprint drops from 3.4 GB down to **1.07 GB VRAM**, enabling real-time System 1 decisions on ultra-low-cost cloud instances, edge devices, and consumer laptops while preserving calibrated decision accuracy.
|
| 58 |
+
|
| 59 |
+
- **Storage Size:** **1.15 GB** (`model.safetensors`)
|
| 60 |
+
- **Active VRAM Footprint:** **1.07 GB**
|
| 61 |
+
- **Decision Speed:** ~35 ms forward pass
|
| 62 |
+
- **JevBench Metamorphic Accuracy:** Maintained within margin of full precision.
|
| 63 |
+
|
| 64 |
+
---
|
| 65 |
+
|
| 66 |
+
## 🚀 Quickstart: Super Friendly 3-Line Decision
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
from qjev import QJev
|
| 70 |
+
|
| 71 |
+
# 1. Load the 4-bit model in 1 line (only 1.07 GB VRAM):
|
| 72 |
+
model = QJev.from_pretrained("devankit7873/QJev-1.5B-4bit")
|
| 73 |
+
|
| 74 |
+
# 2. Decide in 35 ms!
|
| 75 |
+
result = model.decide(
|
| 76 |
+
context="Production database primary replica CPU spiked to 100% and connection pool is exhausted.",
|
| 77 |
+
choices=[
|
| 78 |
+
"Trigger immediate automated failover to standby replica",
|
| 79 |
+
"Restart the primary database daemon immediately",
|
| 80 |
+
"Double connection pool limits without scaling compute",
|
| 81 |
+
"Silence alerts and monitor for next 15 minutes"
|
| 82 |
+
]
|
| 83 |
+
)
|
| 84 |
+
|
| 85 |
+
print(f"👉 Recommended: {result['best_choice']} ({result['confidence']}%)")
|
| 86 |
+
for choice, prob in result['probabilities'].items():
|
| 87 |
+
print(f" [{prob:>5.2f}%] {choice}")
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## 📄 License
|
| 93 |
+
Released under the **Apache 2.0 License**.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|