Files
zeekay f888212afb zen-router: tiny trainable routing model
Reads a prompt, picks the best model. 0.6B encoder-pooled router with
task/route/feature heads; SFT from eval profiles + usage ledger, GRPO on
quality - lambda*cost - mu*latency; serves via hanzo-engine and plugs the
hanzo-router Classifier and enso Featurizer seams. Apache-2.0.
2026-07-07 15:13:57 -07:00

27 lines
703 B
YAML

# zen-router training config
base_model: zenlm/zen-nano-0.6b
output_dir: out/zen-router
tasks: [code, reasoning, math, creative, vision, long_context, cheap_chat, general]
heads:
task: {type: classification, classes: 8}
route: {type: classification, classes_from: catalog} # model catalog ids
features: {type: projection, dim: 256} # bandit feature head
catalog: training/catalog.yaml # ModelCard ids + cost_per_1k, mirrors router registry
sft:
lr: 2.0e-5
epochs: 2
batch_size: 64
max_seq_len: 2048
pooled: last_token
grpo:
# reward = quality - lambda*cost - mu*latency (matches serving SLO)
lambda_cost: 0.35
mu_latency: 0.15
group_size: 8
lr: 5.0e-6