Text Classification
Transformers
ONNX
decision-model
classification
non-autoregressive
calibrated
calibration
zero-shot
routing
agent-router
Instructions to use zoebchhatriwala/Zesyde-150M-Multilingual-Router with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zoebchhatriwala/Zesyde-150M-Multilingual-Router with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="zoebchhatriwala/Zesyde-150M-Multilingual-Router")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zoebchhatriwala/Zesyde-150M-Multilingual-Router", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -36,22 +36,23 @@ pipeline_tag: text-classification
|
|
| 36 |
|
| 37 |
[](pyproject.toml)
|
| 38 |
[](LICENSE)
|
| 39 |
-
[]()
|
| 42 |
|
| 43 |
**Zesyde** is a production-ready, non-autoregressive foundation model engineered for **ultra-fast, mathematically calibrated zero-shot decisions and agent routing** across 1,800+ languages.
|
| 44 |
|
| 45 |
-
Instead of generating text token-by-token with massive generative LLMs, Zesyde scores arbitrary candidate sets simultaneously in **
|
| 46 |
|
| 47 |
---
|
| 48 |
|
| 49 |
## 🚀 Key Highlights
|
| 50 |
|
| 51 |
-
* **Blazing Fast (Non-Autoregressive)**: Generates decisions in **
|
| 52 |
* **Mathematically Calibrated**: Built-in post-hoc temperature scaling fitted via strictly proper scoring rules. Minimizes Expected Calibration Error (**ECE < 2.5%**). Predicted confidence matches empirical accuracy.
|
| 53 |
-
* **Massive Cross-Lingual Coverage**: Native support across **1,800+ languages** utilizing `jhu-clsp/mmBERT`
|
| 54 |
-
* **8,192-Token
|
| 55 |
* **Autonomous Escalation Head (`Act/Escalate`)**: Built-in binary routing logit that autonomously flags low-confidence or high-risk inputs for human review or fallback to heavier frontier models.
|
| 56 |
* **Drop-in CPU Serving**: Optimized FP32 and INT8 ONNX graphs with dynamic quantization and a standalone FastAPI + aesthetic web dashboard.
|
| 57 |
|
|
@@ -94,10 +95,10 @@ pip install -e .
|
|
| 94 |
```python
|
| 95 |
from zesyde.router import ZesydeRouter
|
| 96 |
|
| 97 |
-
# Load calibrated INT8 ONNX engine
|
| 98 |
-
router = ZesydeRouter.from_pretrained("models", max_length=
|
| 99 |
|
| 100 |
-
# Make a calibrated,
|
| 101 |
result = router.decide(
|
| 102 |
context="The new flagship battery lasts for over 3 days on a single charge.",
|
| 103 |
question="What is the sentiment of this review?",
|
|
@@ -107,7 +108,7 @@ result = router.decide(
|
|
| 107 |
print(f"Selected: {result.selected_option}") # "Positive"
|
| 108 |
print(f"Confidence: {result.confidence:.3f}") # 0.982
|
| 109 |
print(f"Should Escalate: {result.should_escalate}") # False
|
| 110 |
-
print(f"Latency: {result.latency_ms:.1f}ms") # 12.4ms
|
| 111 |
```
|
| 112 |
|
| 113 |
---
|
|
@@ -212,10 +213,10 @@ Training can be paused safely at any point:
|
|
| 212 |
## 📦 Export Artifacts
|
| 213 |
|
| 214 |
Running the pipeline outputs complete serving artifacts to `models/`:
|
| 215 |
-
* `zesyde_prod_int8.onnx`: Dynamically quantized 8-bit ONNX model for CPU inference (~95 MB).
|
| 216 |
-
* `zesyde_prod_fp32.onnx`: Full-precision 32-bit ONNX model (~1.
|
| 217 |
* `zesyde_calibration.json`: Persisted temperature scaling lookup table.
|
| 218 |
-
* `zesyde_trained.pt`: Full PyTorch model checkpoint.
|
| 219 |
|
| 220 |
---
|
| 221 |
|
|
@@ -227,7 +228,7 @@ Running the pipeline outputs complete serving artifacts to `models/`:
|
|
| 227 |
title = {Zesyde: Calibrated, Non-Autoregressive Decision & Routing Foundation Models},
|
| 228 |
year = {2026},
|
| 229 |
version = {1.0.0},
|
| 230 |
-
url = {https://
|
| 231 |
}
|
| 232 |
```
|
| 233 |
|
|
|
|
| 36 |
|
| 37 |
[](pyproject.toml)
|
| 38 |
[](LICENSE)
|
| 39 |
+
[]()
|
| 40 |
+
[]()
|
| 41 |
+
[-blue.svg)]()
|
| 42 |
[]()
|
| 43 |
|
| 44 |
**Zesyde** is a production-ready, non-autoregressive foundation model engineered for **ultra-fast, mathematically calibrated zero-shot decisions and agent routing** across 1,800+ languages.
|
| 45 |
|
| 46 |
+
Instead of generating text token-by-token with massive generative LLMs, Zesyde scores arbitrary candidate sets simultaneously in **12–35 milliseconds on pure CPU** using candidate-token pooling, prompt-context fusion, and out-of-sample temperature scaling.
|
| 47 |
|
| 48 |
---
|
| 49 |
|
| 50 |
## 🚀 Key Highlights
|
| 51 |
|
| 52 |
+
* **Blazing Fast (Non-Autoregressive)**: Generates decisions in **12–35ms** on pure CPU via INT8 ONNX Runtime (p50 ~12ms on short sequences / AVX-512, ~33ms average across benchmarks). No autoregressive token generation overhead.
|
| 53 |
* **Mathematically Calibrated**: Built-in post-hoc temperature scaling fitted via strictly proper scoring rules. Minimizes Expected Calibration Error (**ECE < 2.5%**). Predicted confidence matches empirical accuracy.
|
| 54 |
+
* **Massive Cross-Lingual Coverage**: Native support across **1,800+ languages** utilizing `jhu-clsp/mmBERT-base` with zero-dependency heuristic script routing. 313M total parameters (150M-class ModernBERT transformer core + 256k-token multilingual embedding table).
|
| 55 |
+
* **8,192-Token Architectural Context**: RoPE-based rotary positional embeddings and dynamic ONNX axes support sequences up to **8,192 tokens** (fine-tuned up to 1,024 tokens).
|
| 56 |
* **Autonomous Escalation Head (`Act/Escalate`)**: Built-in binary routing logit that autonomously flags low-confidence or high-risk inputs for human review or fallback to heavier frontier models.
|
| 57 |
* **Drop-in CPU Serving**: Optimized FP32 and INT8 ONNX graphs with dynamic quantization and a standalone FastAPI + aesthetic web dashboard.
|
| 58 |
|
|
|
|
| 95 |
```python
|
| 96 |
from zesyde.router import ZesydeRouter
|
| 97 |
|
| 98 |
+
# Load calibrated INT8 ONNX engine (or omit prefer_fp32 for FP32)
|
| 99 |
+
router = ZesydeRouter.from_pretrained("models", prefer_fp32=False, max_length=1024)
|
| 100 |
|
| 101 |
+
# Make a calibrated, fast routing decision
|
| 102 |
result = router.decide(
|
| 103 |
context="The new flagship battery lasts for over 3 days on a single charge.",
|
| 104 |
question="What is the sentiment of this review?",
|
|
|
|
| 108 |
print(f"Selected: {result.selected_option}") # "Positive"
|
| 109 |
print(f"Confidence: {result.confidence:.3f}") # 0.982
|
| 110 |
print(f"Should Escalate: {result.should_escalate}") # False
|
| 111 |
+
print(f"Latency: {result.latency_ms:.1f}ms") # ~12.4ms (short sequence)
|
| 112 |
```
|
| 113 |
|
| 114 |
---
|
|
|
|
| 213 |
## 📦 Export Artifacts
|
| 214 |
|
| 215 |
Running the pipeline outputs complete serving artifacts to `models/`:
|
| 216 |
+
* `zesyde_prod_int8.onnx`: Dynamically quantized 8-bit ONNX model for CPU inference (~318 MB / ~95 MB non-embedding weights).
|
| 217 |
+
* `zesyde_prod_fp32.onnx`: Full-precision 32-bit ONNX model (~1.16 GB).
|
| 218 |
* `zesyde_calibration.json`: Persisted temperature scaling lookup table.
|
| 219 |
+
* `zesyde_trained.pt`: Full PyTorch model checkpoint (~1.17 GB, 313.1M parameters).
|
| 220 |
|
| 221 |
---
|
| 222 |
|
|
|
|
| 228 |
title = {Zesyde: Calibrated, Non-Autoregressive Decision & Routing Foundation Models},
|
| 229 |
year = {2026},
|
| 230 |
version = {1.0.0},
|
| 231 |
+
url = {https://huggingface.co/zoebchhatriwala/Zesyde-150M-Multilingual-Router}
|
| 232 |
}
|
| 233 |
```
|
| 234 |
|