GautamKishore commited on
Commit
4efe9cc
·
verified ·
1 Parent(s): 9b62202

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +31 -27
README.md CHANGED
@@ -37,7 +37,7 @@ tags:
37
  - on-device
38
  - cpu-inference
39
  - low-latency
40
- - 83ms-inference
41
  - 3-model-classes
42
  - gpt-oss
43
  - hermes
@@ -108,11 +108,11 @@ color: blue
108
 
109
  [![GitHub Stars](https://img.shields.io/github/stars/eulogik/fugusashi?style=flat-square&logo=github)](https://github.com/eulogik/fugusashi)
110
  [![PyPI Version](https://img.shields.io/pypi/v/fugusashi?style=flat-square&logo=pypi)](https://pypi.org/project/fugusashi/)
111
- [![HuggingFace](https://img.shields.io/badge/HuggingFace-Models-yellow?style=flat-square&logo=huggingface)](https://huggingface.co/eulogik/fugusashi-model)
112
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
113
  [![ModernBERT](https://img.shields.io/badge/Built%20with-ModernBERT-blueviolet?style=flat-square)](https://huggingface.co/microsoft/modernbert-base)
114
- [![CPU Inference](https://img.shields.io/badge/CPU%20Inference-83ms-brightgreen?style=flat-square)]()
115
- [![83.3% Accuracy](https://img.shields.io/badge/Accuracy-83.3%25-red?style=flat-square)]()
116
 
117
  **The world's first open-source, federated-learning-powered intelligent model orchestration engine** — selects the best LLM for every prompt with human-readable explanations, zero cost, and full privacy.
118
 
@@ -124,14 +124,17 @@ color: blue
124
 
125
  | Metric | Value |
126
  |--------|-------|
127
- | **Intelligent Dispatch Accuracy** | **83.3%** (30 held-out prompts, 3 models) |
128
- | **vs. Cost-Only Baseline** | **2.3× improvement** (83.3% vs 36.7%) |
129
- | **Inference Latency** | 83ms per decision (CPU, no GPU) |
130
- | **Training Time** | 137 seconds on CPU (Apple M3 Pro) |
131
- | **Training Data** | 224 examples, 80/20 split |
132
- | **Federated Accuracy (3 clients)** | **85.0%** with differential privacy (ε=1.8) |
 
133
  | **Federated Convergence** | 5 rounds to reach 80% of peak |
134
  | **Models Supported** | 3+ open models via OpenRouter |
 
 
135
  | **Overhead (Single Decision)** | <4ms (excluding model inference) |
136
  | **License** | MIT (fully open-source) |
137
 
@@ -197,9 +200,9 @@ Traditional LLM routing uses **expensive 7B-parameter coordinator LLMs** (like S
197
 
198
  Fugusashi uses a **lightweight 149M-parameter ModernBERT classifier** that:
199
  - ✅ Runs on **CPU only** — no GPU needed
200
- - ✅ Makes decisions in **83ms** per prompt — real-time capable
201
- - ✅ Achieves **83.3% accuracy** — outperforms cost-only baselines by **2.3×**
202
- - ✅ Trained in **137 seconds** on a single CPU core
203
  - ✅ Uses only **224 training examples** — minimal data requirement
204
  - ✅ Is **100% open-source** and fully reproducible
205
 
@@ -216,8 +219,8 @@ Fugusashi uses a **lightweight 149M-parameter ModernBERT classifier** that:
216
  | **Batch Size** | 16 |
217
  | **Epochs** | 10 with early stopping |
218
  | **Hardware** | Apple M3 Pro, 18GB RAM, CPU only |
219
- | **Training Time** | 137 seconds |
220
- | **Per-Inference Latency** | 83ms (forward pass) |
221
 
222
  ### Class Distribution
223
 
@@ -244,16 +247,15 @@ Fugusashi uses a **lightweight 149M-parameter ModernBERT classifier** that:
244
  ### Accuracy Comparison
245
 
246
  ```
247
- Random ████░░░░░░░░░░░░░░░░░░ 33.3%
248
- Cost-Only █████░░░░░░░░░░░░░░░░░ 36.7% ← Baseline
249
- CMA-ES Only ████████████████░░░░░ 70.0%
250
- Learned (Test)█████████████████░░░░ 80.0%
251
- Learned (Bench)██████████████████░░░░ 83.3% ← Best
252
- Federated (3) ██████████████████░░░░ 85.0%
253
- Always-Best ██████████████████████ 100% ← Oracle
254
  ```
255
 
256
- **Key Insight:** The learned ModernBERT classifier **more than doubles** the accuracy of the simple cost-only baseline (83.3% vs 36.7%, a **2.3× improvement**) while adding minimal latency overhead.
257
 
258
  ---
259
 
@@ -275,10 +277,12 @@ Fugusashi enables **multiple organizations** to collaboratively improve the disp
275
  |---------|----------------------|----------------|-------------|------------|
276
  | 1 (standalone) | — | 70.0% | ∞ (no privacy) | 224 |
277
  | 2 | 8 | 78.0% | 2.1 | 1,800 |
278
- | 3 | **5** | **85.0%** | **1.8** | 2,400 |
279
  | 5 | 3 | 88.0% | 1.5 | 3,600 |
280
  | 10 | 2 | 91.0% | 1.2 | 6,000 |
281
 
 
 
282
  ### Why Federated Routing Works
283
 
284
  Routing knowledge is **complementary** across domains:
@@ -391,7 +395,7 @@ fugusashi serve --host 0.0.0.0 --port 8000
391
  | **Federated** | ✅ w/ privacy | ❌ | ❌ | ❌ |
392
  | **Explainability** | ✅ Full NL explanations | ❌ | ❌ | ❌ |
393
  | **Overridable** | ✅ User feedback loop | ❌ | ❌ | ❌ |
394
- | **CPU Inference** | ✅ 83ms | ❌ GPU required | ✅ | ✅ |
395
  | **Model Classes** | 3+ (expandable) | Proprietary | 2 tiers | 16 strategies |
396
  | **Cost** | Free (MIT) | Proprietary pricing | Free | Free |
397
 
@@ -415,8 +419,8 @@ All results are fully reproducible:
415
  | Resource | Link |
416
  |----------|------|
417
  | **Source Code** | [github.com/eulogik/fugusashi](https://github.com/eulogik/fugusashi) |
418
- | **Trained Model Weights** | [huggingface.co/eulogik/fugusashi-model](https://huggingface.co/eulogik/fugusashi-model) |
419
- | **Preference Dataset** | [huggingface.co/datasets/eulogik/fugusashi-dataset](https://huggingface.co/datasets/eulogik/fugusashi-dataset) |
420
  | **Live Demo** | [huggingface.co/spaces/eulogik/fugusashi](https://huggingface.co/spaces/eulogik/fugusashi) |
421
  | **Paper (arXiv)** | [github.com/eulogik/fugusashi/blob/main/paper/main.tex](https://github.com/eulogik/fugusashi/blob/main/paper/main.tex) |
422
  | **API Documentation** | [eulogik.com/fugusashi](https://eulogik.com/fugusashi) |
 
37
  - on-device
38
  - cpu-inference
39
  - low-latency
40
+ - 22ms-inference
41
  - 3-model-classes
42
  - gpt-oss
43
  - hermes
 
108
 
109
  [![GitHub Stars](https://img.shields.io/github/stars/eulogik/fugusashi?style=flat-square&logo=github)](https://github.com/eulogik/fugusashi)
110
  [![PyPI Version](https://img.shields.io/pypi/v/fugusashi?style=flat-square&logo=pypi)](https://pypi.org/project/fugusashi/)
111
+ [![HuggingFace](https://img.shields.io/badge/HuggingFace-Models-yellow?style=flat-square&logo=huggingface)](https://huggingface.co/eulogik/fugusashi-v1.3)
112
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
113
  [![ModernBERT](https://img.shields.io/badge/Built%20with-ModernBERT-blueviolet?style=flat-square)](https://huggingface.co/microsoft/modernbert-base)
114
+ [![CPU Inference](https://img.shields.io/badge/CPU%20Inference-22ms-brightgreen?style=flat-square)](https://github.com/eulogik/fugusashi/blob/main/paper/main.tex)
115
+ [![80.0% Accuracy](https://img.shields.io/badge/Accuracy-80.0%25-red?style=flat-square)](https://github.com/eulogik/fugusashi/blob/main/paper/main.tex)
116
 
117
  **The world's first open-source, federated-learning-powered intelligent model orchestration engine** — selects the best LLM for every prompt with human-readable explanations, zero cost, and full privacy.
118
 
 
124
 
125
  | Metric | Value |
126
  |--------|-------|
127
+ | **Intelligent Dispatch Accuracy** | **80.0%** (24/30 held-out prompts, 3 models) |
128
+ | **vs. Cost-Only Baseline** | **2.2× improvement** (80.0% vs 36.7%, Fisher's exact test p = 1.4 × 10⁻³) |
129
+ | **Test Accuracy** | 80.0% (36/45, macro F1 0.83) |
130
+ | **Inference Latency** | 22ms median, 38ms p95 (M3 Pro, CPU) |
131
+ | **Training Time** | 163 seconds on CPU (Apple M3 Pro, 4 epochs) |
132
+ | **Training Data** | 224 examples, 179/45 split, seed 42 |
133
+ | Federated Accuracy (3 clients)† | 85.0%† with differential privacy (ε=1.8) |
134
  | **Federated Convergence** | 5 rounds to reach 80% of peak |
135
  | **Models Supported** | 3+ open models via OpenRouter |
136
+
137
+ † *Preliminary evaluation on 20 hand-curated prompts — too small to publish as a benchmark.*
138
  | **Overhead (Single Decision)** | <4ms (excluding model inference) |
139
  | **License** | MIT (fully open-source) |
140
 
 
200
 
201
  Fugusashi uses a **lightweight 149M-parameter ModernBERT classifier** that:
202
  - ✅ Runs on **CPU only** — no GPU needed
203
+ - ✅ Makes decisions in **22ms** median per prompt — real-time capable
204
+ - ✅ Achieves **80.0% held-out accuracy** — outperforms cost-only baselines by **2.2×**
205
+ - ✅ Trained in **163 seconds** on a single CPU core
206
  - ✅ Uses only **224 training examples** — minimal data requirement
207
  - ✅ Is **100% open-source** and fully reproducible
208
 
 
219
  | **Batch Size** | 16 |
220
  | **Epochs** | 10 with early stopping |
221
  | **Hardware** | Apple M3 Pro, 18GB RAM, CPU only |
222
+ | **Training Time** | 163 seconds (4 epochs) |
223
+ | **Per-Inference Latency** | 22ms median, 38ms p95 (forward pass) |
224
 
225
  ### Class Distribution
226
 
 
247
  ### Accuracy Comparison
248
 
249
  ```
250
+ Random ████░░░░░░░░░░░░░░░░░░ 33.3%
251
+ Cost-Only █████░░░░░░░░░░░░░░░░░ 36.7% ← Baseline
252
+ Learned (Test) ████████████████░░░░░ 80.0%
253
+ Learned (Held-Out)█████████████████░░░░ 80.0% ← Best learned
254
+ Federated (3) ██████████████████░░░░ 85.0%
255
+ Always-Best ██████████████████████ 100% ← Oracle
 
256
  ```
257
 
258
+ **Key Insight:** The learned ModernBERT classifier **more than doubles** the accuracy of the simple cost-only baseline (80.0% vs 36.7% on held-out prompts, a **2.2× improvement**, Fisher's exact test p = 1.4 × 10⁻³) while adding minimal latency overhead.
259
 
260
  ---
261
 
 
277
  |---------|----------------------|----------------|-------------|------------|
278
  | 1 (standalone) | — | 70.0% | ∞ (no privacy) | 224 |
279
  | 2 | 8 | 78.0% | 2.1 | 1,800 |
280
+ | 3 | **5** | 85.0% | **1.8** | 2,400 |
281
  | 5 | 3 | 88.0% | 1.5 | 3,600 |
282
  | 10 | 2 | 91.0% | 1.2 | 6,000 |
283
 
284
+ *Preliminary: all federated results are evaluated on 20 hand-curated prompts.*
285
+
286
  ### Why Federated Routing Works
287
 
288
  Routing knowledge is **complementary** across domains:
 
395
  | **Federated** | ✅ w/ privacy | ❌ | ❌ | ❌ |
396
  | **Explainability** | ✅ Full NL explanations | ❌ | ❌ | ❌ |
397
  | **Overridable** | ✅ User feedback loop | ❌ | ❌ | ❌ |
398
+ | **CPU Inference** | ✅ 22ms median | ❌ GPU required | ✅ | ✅ |
399
  | **Model Classes** | 3+ (expandable) | Proprietary | 2 tiers | 16 strategies |
400
  | **Cost** | Free (MIT) | Proprietary pricing | Free | Free |
401
 
 
419
  | Resource | Link |
420
  |----------|------|
421
  | **Source Code** | [github.com/eulogik/fugusashi](https://github.com/eulogik/fugusashi) |
422
+ | **Trained Model Weights** | [huggingface.co/eulogik/fugusashi-v1.3](https://huggingface.co/eulogik/fugusashi-v1.3) |
423
+ | **Preference Dataset** | [huggingface.co/datasets/eulogik/fugusashi-preferences](https://huggingface.co/datasets/eulogik/fugusashi-preferences) |
424
  | **Live Demo** | [huggingface.co/spaces/eulogik/fugusashi](https://huggingface.co/spaces/eulogik/fugusashi) |
425
  | **Paper (arXiv)** | [github.com/eulogik/fugusashi/blob/main/paper/main.tex](https://github.com/eulogik/fugusashi/blob/main/paper/main.tex) |
426
  | **API Documentation** | [eulogik.com/fugusashi](https://eulogik.com/fugusashi) |