Skip to content

Kyojin: open-source engine that runs 100 GB-class open models (GLM-5.3, Qwen3.8, DeepSeek V4.1) on one desktop machine. AMD Strix Halo, NVIDIA RTX and Apple Mac. OpenAI API, built on ExLlamaV3.

nix: ship file-relative serve assets

Tristin Stagg28ccceea35d5
diff --git a/flake.nix b/flake.nix
index 19a039c..bfa0abb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -581,8 +581,22 @@
mkdir -p $out/share/kyojin/$flavor
cp $src/tools/$flavor/serve.py $src/tools/$flavor/serve_metrics.py \
$out/share/kyojin/$flavor/
+ # chat templates live next to the scripts (qwen/mimo) or in
+ # lanes/assets (glm); the servers resolve them relative to
+ # their own file, so ship them at the same relative paths.
+ for tmpl in $src/tools/$flavor/chat_template.jinja; do
+ [ -e "$tmpl" ] && cp "$tmpl" $out/share/kyojin/$flavor/
+ done
done
+ mkdir -p $out/share/kyojin/lanes/assets
+ cp $src/tools/lanes/assets/glm53-template-medium.jinja \
+ $out/share/kyojin/lanes/assets/
cp $src/tools/startup_health.py $out/share/kyojin/
+ # startup_health loads exllamav3.util.hip_compiler by path
+ # (without importing exllamav3, to avoid latching engine env);
+ # mirror the repo-root layout it expects.
+ mkdir -p $out/share/exllamav3/util
+ cp $src/exllamav3/util/hip_compiler.py $out/share/exllamav3/util/
for flavor in glm mimo qwen; do
makeWrapper ${kyojinEnv}/bin/python $out/bin/kyojin-serve-$flavor \
--add-flags "$out/share/kyojin/$flavor/serve.py" \