swarajchattaraj commited on
Commit
271c0bd
·
verified ·
1 Parent(s): 070fc55

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +54 -0
README.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ pipeline_tag: text-classification
6
+ tags:
7
+ - dristi
8
+ - router
9
+ - compound-ai
10
+ - system-one
11
+ - system-two
12
+ - classification
13
+ - fast-inference
14
+ ---
15
+
16
+ # ⚡ DRISTI: Compound AI Routing Engine
17
+
18
+ **Dristi** is an ultra-fast, strictly-typed, non-autoregressive probabilistic decision engine. Built as a "System One" router, it handles routine AI routing tasks in milliseconds for fractions of a cent, intelligently routing difficult or uncertain queries to heavy "System 2" models.
19
+
20
+ Unlike standard generative models that hallucinate and take seconds to return text, Dristi returns strict JSON probabilities and logic routing decisions.
21
+
22
+ ## 🏗️ Architecture: The Dual-Engine Cascade
23
+
24
+ This repository represents one half of the **Dristi Dual-Engine Cascade**. Dristi uses two specialized mathematical models to balance extreme speed and deep intelligence:
25
+
26
+ 1. **V1 (The Speed Demon):** Built on `DistilBERT`. Hits ~40ms latency and runs on GPU. The ultimate frontline router.
27
+ 2. **V2 (The Heavy Thinker):** Built on `DeBERTa-v3`. Uses Disentangled Attention to understand complex sarcasm and highly technical logic. Loaded into CPU RAM as a local safety net.
28
+
29
+ When integrated using the Dristi framework, queries flow to **V1** first. If V1 lacks confidence or mathematically detects an anomaly, it instantly cascades the query to **V2** entirely locally.
30
+
31
+ ## ✨ Enterprise Features
32
+ * **Mathematical Self-Awareness (OOD Detection):** Rejects alien or unsafe queries using Cosine Similarity against a pre-computed mathematical centroid.
33
+ * **Compound AI Routing:** Natively cascades from Fast models to Heavy models (or external APIs) based on calibrated confidence thresholds.
34
+ * **Calibrated Confidence:** Uses L-BFGS Temperature Scaling.
35
+ * **Self-Healing API:** Designed to actively learn from human/API feedback in production.
36
+
37
+ ## 🚀 How to Use
38
+
39
+ To use these weights, you should use the official open-source Dristi inference engine, which handles the complex routing, OOD detection, and FastAPI deployment automatically.
40
+
41
+ 1. Clone the core architecture:
42
+ ```bash
43
+ git clone https://github.com/SWARAJCHATTARAJ/DRISTI.git
44
+ cd DRISTI
45
+ ```
46
+ 2. Download these model weights (`pytorch_model.bin`) and place them in the `checkpoints/` directory of your cloned repository.
47
+ 3. Start the dual-engine router or the FastAPI server!
48
+ ```bash
49
+ python -m inference.dual_engine
50
+ # or
51
+ uvicorn inference.api:app --host 0.0.0.0 --port 8000
52
+ ```
53
+
54
+ *Note: The custom architecture python file (`dristi_model.py`) is included in this Hugging Face repository for reference and compatibility with advanced HF loaders, but the official Dristi pipeline is recommended for production deployment.*