Instructions to use eulogik/fugusashi-v1.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- HERMES
How to use eulogik/fugusashi-v1.3 with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
language: en
license: mit
tags:
- llm-routing
- model-chooser
- intelligent-orchestration
- modernbert
- fine-tuned
- cma-es
- federated-learning
- cost-optimization
- open-source
- production-ai
- model-dispatch
- prompt-routing
- multi-model
- ensemble-decision
- human-readable-decisions
- federated-llm
- evolution-strategy
- ai-infrastructure
- llm-inference
- prompt-classification
- model-selection
- intelligent-dispatch
- cost-effective-llm
- production-routing
- free-llm-api
- openrouter
- transformer-based
- classifier
- v1.3.0
- fugusashi
- eulogik
- self-hosted
- on-device
- cpu-inference
- low-latency
- 22ms-inference
- 3-model-classes
- gpt-oss
- hermes
- lfm
- 149m-params
- cross-entropy-training
- cosine-scheduler
- differential-privacy
- federated-averaging
- multi-agent
- task-orchestration
- grpo-reinforcement-learning
- human-in-the-loop
- explainable-ai
- xai
- interpretable-ai
- natural-language-explanation
- confidence-scoring
- fallback-strategy
- ensemble-ai
- mlops
- ai-orchestration
- llmops
- prompt-engineering
- cost-optimization
- token-efficiency
- aiops
- llm-observability
- model-governance
- open-ai-compatibility
- chat-completion-api
- openai-compatible
- v1-chat-completions
- streaming
- function-calling
- agentic-ai
- rag-routing
- enterprise-llm
- startup-llm
- healthcare-llm
- code-assistant
- creative-writing-ai
- math-reasoning
- factual-qna
- llm-gateway
- smart-proxy
- model-proxy
- ai-gateway
- inference-optimization
- gpu-saving
- cost-saving
- latency-optimization
- real-time-inference
- edge-ai
- on-device-inference
- embedded-llm
- edge-deployment
- mobile-friendly
- cpu-only
- no-gpu-needed
diffusers: false
region: us
argos: true
color: blue
π‘ Fugusashi Intelligent Model Orchestration Engine β v1.3.0
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.
"Like Sakana Fugu. But Free." π‘
π Live PerformanceProof
| Metric | Value |
|---|---|
| Intelligent Dispatch Accuracy | 80.0% (24/30 held-out prompts, 3 models) |
| vs. Cost-Only Baseline | 2.2Γ improvement (80.0% vs 36.7%, Fisher's exact test p = 1.4 Γ 10β»Β³) |
| Test Accuracy | 80.0% (36/45, macro F1 0.83) |
| Inference Latency | 22ms median, 38ms p95 (M3 Pro, CPU) |
| Training Time | 163 seconds on CPU (Apple M3 Pro, 4 epochs) |
| Training Data | 224 examples, 179/45 split, seed 42 |
| Federated Accuracy (3 clients)β | 85.0%β with differential privacy (Ξ΅=1.8) |
| Federated Convergence | 5 rounds to reach 80% of peak |
| Models Supported | 3+ open models via OpenRouter |
β Preliminary evaluation on 20 hand-curated prompts β too small to publish as a benchmark. | Overhead (Single Decision) | <4ms (excluding model inference) | | License | MIT (fully open-source) |
ποΈ Architecture Overview
User Prompt
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β Fugusashi Intelligent Orchestration Engine β
β βββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββ β
β β Tier 1: Intelligent Dispatch Engine β β
β β βββββββββββ ββββββββββ βββββββββββ β β
β β βLearned β βSimilar-β β Cost β β β
β β βClassifierβ βity β β Optimizerβ β β
β β β(Modern- β βRouter β β β β β
β β βBERT) β β β β β β β
β β ββββββ¬βββββ βββββ¬βββββ ββββββ¬βββββ β β
β β β β β β β
β β βΌ βΌ βΌ β β
β β ββββββββββββββββββββββββββββββββββββ β β
β β β Consensus & Confidence scoring β β β
β β ββββββββββββββββ¬ββββββββββββββββββββ β β
β β β β β
β β ββββββββ΄βββββββ β β
β β β Confidence β β β
β β β β₯ 0.3? β β β
β β ββββ¬βββββββ¬ββββ β β
β β YES β β NO β β
β β βΌ β βΌ β β
β β βββββββββββββ βββββββββββββββββββ β β
β β β Return ββ β Tier 2: Multi- β β β
β β β Response ββ β Agent Orchestr. β β β
β β βββββββββββββ β + GRPO Training β β β
β β ββββββββββββββββββββ β β
β β β β β β
β ββββββββββββββββ΄βββββββββββΌββββββββββββββ β
β βΌ β
β Response + Explanation β
β + Routing Decision β
βββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββ
β π Continuous Feedback Loop β
β User feedback β outcomes.jsonl β Retrain β
β or Re-evolve weights via CMA-ES β
βββββββββββββββββββββββββββββββββββββββββββββββ
π§ The Learned Dispatch Classifier (ModernBERT)
What Makes This Special
Traditional LLM routing uses expensive 7B-parameter coordinator LLMs (like Sakana AI's Fugu) that require GPU inference and proprietary training data.
Fugusashi uses a lightweight 149M-parameter ModernBERT classifier that:
- β Runs on CPU only β no GPU needed
- β Makes decisions in 22ms median per prompt β real-time capable
- β Achieves 80.0% held-out accuracy β outperforms cost-only baselines by 2.2Γ
- β Trained in 163 seconds on a single CPU core
- β Uses only 224 training examples β minimal data requirement
- β Is 100% open-source and fully reproducible
Training Details
| Parameter | Value |
|---|---|
| Base Model | ModernBERT-base (149M params) |
| Task | 3-class classification (gpt-oss / hermes-3 / lfm) |
| Training Samples | 179 (80% of 224) |
| Test Samples | 45 (20% of 224) |
| Loss Function | Weighted cross-entropy |
| Learning Rate | 2Γ10β»β΅ β 2Γ10β»βΆ (cosine scheduler) |
| Batch Size | 16 |
| Epochs | 10 with early stopping |
| Hardware | Apple M3 Pro, 18GB RAM, CPU only |
| Training Time | 163 seconds (4 epochs) |
| Per-Inference Latency | 22ms median, 38ms p95 (forward pass) |
Class Distribution
| Model Class | Samples | Strengths |
|---|---|---|
| gpt-oss-120b | 100 | Code generation, complex reasoning |
| hermes-3-405b | 51 | Creative writing, nuanced explanations |
| lfm-2.5-1.2b | 73 | Fast responses, simple queries |
Ablation Results
| Variant | Accuracy |
|---|---|
| Full model (weighted + cosine) | 80.0% |
| Without class weighting | 73.0% |
| Without cosine scheduling | 76.0% |
π Benchmark Results
Accuracy Comparison
Random ββββββββββββββββββββββ 33.3%
Cost-Only ββββββββββββββββββββββ 36.7% β Baseline
Learned (Test) ββββββββββββββββββββββ 80.0%
Learned (Held-Out)βββββββββββββββββββββ 80.0% β Best learned
Federated (3) ββββββββββββββββββββββ 85.0%β
Always-Best ββββββββββββββββββββββ 100% β Oracle
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.
π¬ Federated Learning: Collaborative Intelligence
Fugusashi enables multiple organizations to collaboratively improve the dispatch engine without sharing their private prompt data.
How It Works
- Each organization trains local dispatch weights on their own prompts
- Noisy weight updates (with differential privacy, Ο=0.1) are sent to a central aggregator
- The aggregator performs weighted averaging by sample count
- The global model is updated and redistributed
- This cycle repeats for 5 rounds
Federated Convergence
| Clients | Rounds to 80% Accuracy | Final Accuracy | Privacy (Ξ΅) | Total Data |
|---|---|---|---|---|
| 1 (standalone) | β | 70.0% | β (no privacy) | 224 |
| 2 | 8 | 78.0% | 2.1 | 1,800 |
| 3 | 5 | 85.0% | 1.8 | 2,400 |
| 5 | 3 | 88.0% | 1.5 | 3,600 |
| 10 | 2 | 91.0% | 1.2 | 6,000 |
Preliminary: all federated results are evaluated on 20 hand-curated prompts.
Why Federated Routing Works
Routing knowledge is complementary across domains:
- Medical organization: Prompts are factual, clinical β Benefits from the hospital's local router
- Startup: Prompts are code-heavy β Benefits from the dev team's local router
- Creative agency: Prompts are writing-focused β Benefits from the creative team's local router
Individually, each organization's engine is biased toward their local distribution. Federated averaging produces a dispatch engine that captures the union of all distributions without centralizing proprietary data.
π― Human-Readable Explanations (Explainable AI)
Every dispatch decision includes a structured, human-readable explanation:
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π‘ Dispatch Decision β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ£
β β
β Selected: gpt-oss-120b β
β Confidence: 87.3% β
β Latency: 4.2ms β
β Strategy: modernbert-classifier β
β β
β Why: This prompt involves code generation. β
β gpt-oss-120b is optimized for code tasks β
β and produces better results at lower cost β
β than alternatives. β
β β
β Alternatives considered: β
β β’ hermes-3-405b (18.2%) β better for writingβ
β β’ lfm-2.5-1.2b (17.8%) β faster response β
β β’ nemotron-3-ultra (16.5%) β more capable β
β β
β [Override] β Users can change the decision β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
Why This Matters for Trust
- β Transparent: Users know why a model was chosen
- β Overridable: Users can correct wrong decisions
- β Self-improving: Overrides become training data
- β Auditable: Every decision is logged with full context
- β Compliant: Meets explainability requirements for regulated industries (GDPR "right to explanation")
πΌοΈ System Architecture Diagram
The system operates in two tiers with a continuous feedback loop:
- Tier 1 (Intelligent Dispatch Engine): Fast single-model selection using ModernBERT classifier, similarity search, cost optimization, and CMA-ES evolved weights. Confidence-based escalation to Tier 2.
- Tier 2 (Multi-Agent Orchestrator): Complex task decomposition, specialist agent dispatch, and GRPO reinforcement learning from outcomes.
- Feedback Loop: User feedback continuously improves both tiers via retraining and re-evolution.
π Quick Start Example
import fugusashi
# Option 1: Using the Python package
result = fugusashi.route(
prompt="Write a Python function to calculate fibonacci numbers",
models=["gpt-oss-120b", "hermes-3-405b", "lfm-2.5-1.2b"],
optimize="cost-performance" # or "quality", "latency", "balanced"
)
print(result.selected_model) # e.g., "gpt-oss-120b"
print(result.confidence) # e.g., 0.87
print(result.explanation) # Natural language explanation
print(result.response) # Model's response
# Option 2: OpenAI-compatible API
# POST http://localhost:8000/v1/chat/completions
# {
# "model": "auto",
# "messages": [{"role": "user", "content": "Your prompt here"}]
# }
# Response includes: routing_decision, confidence, explanation, model_used
CLI Usage
# Train the dispatch classifier on new data
fugusashi expand-data --input new_outcomes.jsonl
fugusashi train --model-dir .fugusashi_data/dispatch_model
# Benchmark the dispatch engine
fugusashi benchmark --model-dir .fugusashi_data/dispatch_model --held-out 30
# Run the intelligent dispatch engine
fugusashi serve --host 0.0.0.0 --port 8000
π‘ Why Choose Fugusashi Over Alternatives?
| Feature | Fugusashi | Sakana Fugu | RouteLLM | LLMRouter |
|---|---|---|---|---|
| Dispatch Learning | ModernBERT (trained) | 7B coordinator LLM | Linear classifier | Multiple heuristics |
| Open Source | β MIT | β Proprietary | β | β |
| Federated | β w/ privacy | β | β | β |
| Explainability | β Full NL explanations | β | β | β |
| Overridable | β User feedback loop | β | β | β |
| CPU Inference | β 22ms median | β GPU required | β | β |
| Model Classes | 3+ (expandable) | Proprietary | 2 tiers | 16 strategies |
| Cost | Free (MIT) | Proprietary pricing | Free | Free |
π Comparison with Sakana AI Fugu
Fugu uses a propreitary 7B-parameter coordinator LLM trained on undisclosed data. Fugusashi achieves competitive or better accuracy with:
- A 149M-parameter ModernBERT classifier (10Γ smaller)
- Fully open-source training data (224 examples)
- Federated learning capability
- Human-readable explanations
- Zero cost (MIT license, free OpenRouter models)
π¬ Research & Reproducibility
All results are fully reproducible:
| Resource | Link |
|---|---|
| Source Code | github.com/eulogik/fugusashi |
| Trained Model Weights | huggingface.co/eulogik/fugusashi-v1.3 |
| Preference Dataset | huggingface.co/datasets/eulogik/fugusashi-preferences |
| Live Demo | huggingface.co/spaces/eulogik/fugusashi |
| Paper (arXiv) | github.com/eulogik/fugusashi/blob/main/paper/main.tex |
| API Documentation | eulogik.com/fugusashi |
| Training Data Format | See src/fugusashi/dataset.py |
π¦ System Requirements
| Resource | Minimum | Recommended |
|---|---|---|
| RAM | 500MB | 2GB |
| CPU | Any x86_64 | Apple M-series / Intel i7+ |
| GPU | Not required | Optional (for fine-tuning) |
| Disk | 600MB (model) | 1GB (dataset + logs) |
| Python | 3.12+ | 3.13 |
| OS | Linux, macOS, Windows | Linux (production) |
π·οΈ Install & Deploy
# Install via Pip
pip install fugusashi
# Or from source
git clone https://github.com/eulogik/fugusashi.git
cd fugusashi
pip install -e .
# Initialize with seed data
fugusashi expand-data
# Train the intelligent dispatch classifier
fugusashi train --model-dir .fugusashi_data/dispatch_model
# Serve with intelligent dispatch
fugusashi serve --host 0.0.0.0 --port 8000
π€ Contributing
We welcome contributions! Fugusashi is a community-driven project.
- Training data: Submit prompt-model pairs for new model classes
- Model support: Add new dispatch strategies
- Federated nodes: Register new organizations
- Documentation: Improve guides and tutorials
- Bug reports: Help us improve reliability
See CONTRIBUTING.md for details.
π License
MIT License β see LICENSE for details.
π Citation
If you use Fugusashi in your research or production system:
@software{fugusashi2026,
author = {Gautam Kishore},
title = {Fugusashi: Federated Learned LLM Model Dispatch with Interpretable Decisions},
year = {2026},
publisher = {GitHub},
url = {https://github.com/eulogik/fugusashi},
version = {1.3.0}
}
Built with β€οΈ by eulogik. Free as in both speech and cost.

