eulogik/fugusashi-preferences
Viewer β’ Updated β’ 20 β’ 11
By eulogik β building AI infrastructure for everyone.
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.
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}")
| 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 |
| 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 |
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}
}
MIT β use it however you want.