English
model-router
llm
cma-es
open-source
fugusashi

Fugusashi Router

PyPI GitHub License Dataset Space Website

By eulogik β€” building AI infrastructure for everyone.


What is This?

CMA-ES evolved routing weights for the Fugusashi intelligent model router. A 385-dimensional weight vector that maps prompt embeddings to model selection β€” learned via Covariance Matrix Adaptation Evolution Strategy, the same approach used in Sakana AI's TRINITY paper.

Like Sakana Fugu. But Free. And Yours.

Usage

import numpy as np
import json
from sentence_transformers import SentenceTransformer

# Load weights
with open("cmaes_weights.json") as f:
    data = json.load(f)

weights = np.array(data["mean"])
bias = data["mean"][-1]

# Embed prompt and route
model = SentenceTransformer("all-MiniLM-L6-v2")
embedding = model.encode(["Write a Python function to sort a list"], normalize_embeddings=True)[0]

logits = embedding * weights[:384] + bias
models = ["gpt-oss-120b", "nemotron-3-ultra", "nemotron-3-super", "hermes-3-405b", "lfm-2.5-1.2b"]
chosen = models[np.argmax(logits)]
print(f"Route to: {chosen}")

Training Details

Field Value
Algorithm CMA-ES (Covariance Matrix Adaptation Evolution Strategy)
Dimensions 385 (384 weights + 1 bias)
Population 16
Generations 30
Training tasks 20 preference samples
Best fitness ~0.24
Embedding model all-MiniLM-L6-v2

Project Links

Resource Link
🌐 Website eulogik.github.io/fugusashi
πŸ’» Source Code github.com/eulogik/fugusashi
πŸ“¦ PyPI pypi.org/project/fugusashi
πŸ“Š Dataset huggingface.co/datasets/eulogik/fugusashi-preferences
πŸš€ Live Demo huggingface.co/spaces/eulogik/fugusashi
🌍 eulogik eulogik.com

Citation

If you use Fugusashi in your work:

@software{fugusashi2026,
  title={Fugusashi: Open-Source Intelligent Model Router},
  author={{eulogik}},
  year={2026},
  url={https://github.com/eulogik/fugusashi}
}

License

MIT β€” use it however you want.


**Built with ❀️ by [eulogik](https://eulogik.com)**
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train eulogik/fugusashi-router

Paper for eulogik/fugusashi-router