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

8 lines
418 B
Bash
Executable File

#!/usr/bin/env bash
# Quantize trained zen-router to GGUF (Q4_K_M) and MLX.
set -euo pipefail
MODEL_DIR="${1:-out/zen-router}"
python ../llama.cpp/convert_hf_to_gguf.py "$MODEL_DIR" --outfile "$MODEL_DIR/zen-router-f16.gguf"
../llama.cpp/build/bin/llama-quantize "$MODEL_DIR/zen-router-f16.gguf" "$MODEL_DIR/zen-router-Q4_K_M.gguf" Q4_K_M
python -m mlx_lm convert --hf-path "$MODEL_DIR" --mlx-path "$MODEL_DIR/mlx" -q