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.

Merge upstream/main (v1.5.8)

MangetsuC87fb4a0473ca
diff --cc tools/glm/serve.py
index 9143512,9615b5b..817835c
--- a/tools/glm/serve.py
+++ b/tools/glm/serve.py
@@@ -26,17 -25,9 +26,18 @@@ from jinja2.sandbox import ImmutableSan
sys.path.append(str(Path(__file__).resolve().parent.parent))
import startup_health # noqa: E402 (GET /health with load progress while the model loads)
import serve_compat # noqa: E402 (vLLM-style token-id prompts, cache_salt, /tokenize, usage details)
+ from l21_prompt_encode_cache import PromptEncodeCache # noqa: E402 (incremental prompt encode)
# serve_metrics.py is a symlink to the shared tools/strix_halo/serve_metrics.py
from serve_metrics import Metrics
+# serve_reqlog.py is a symlink to the shared tools/strix_halo/serve_reqlog.py: one line per request
+# lifecycle event (numbers and event names only, never prompt or reply text) plus a heartbeat while a job
+# is queued or prefilling, so "the client went silent" can be lined up with what the server was doing.
+# Off unless KYOJIN_REQLOG_DIR names a directory; the server prints which of the two it is at start-up.
+from serve_reqlog import Lifecycle, ReqLog, StreamWriter, refusal_text, sanitize
+# serve_ping.py is a symlink to the shared tools/strix_halo/serve_ping.py: an SSE comment line every
+# KYOJIN_SSE_PING_S while a stream has nothing to send yet (off by default), so the same silence is
+# visible to the client and not only in the log file.
+from serve_ping import ServePing
from image_cache import ImageEmbeddingCache, digest
DEFAULT_MODEL = "~/models/glm53-exl3-td205"
diff --cc tools/qwen/serve.py
index 9267e5b,6f92f16..abd79b6
--- a/tools/qwen/serve.py
+++ b/tools/qwen/serve.py
@@@ -43,13 -42,7 +43,14 @@@ sys.path.append(str(HERE.parent)
import startup_health # noqa: E402 (GET /health with load progress while the model loads)
import image_cache # noqa: E402 (shared bounded LRU of image embeddings; symlink to tools/strix_halo)
import serve_compat # noqa: E402 (vLLM-style token-id prompts, cache_salt, /tokenize, usage details)
+ from l21_prompt_encode_cache import PromptEncodeCache # noqa: E402 (incremental prompt encode)
+# serve_ping.py is a symlink to the shared tools/strix_halo/serve_ping.py: an SSE comment line every
+# KYOJIN_SSE_PING_S while a stream has nothing to send yet (off by default), so a long prefill does
+# not look like a hung server to a client that only watches its socket.
+from serve_ping import ServePing # noqa: E402
+# serve_reqlog.py is a symlink to the shared tools/strix_halo/serve_reqlog.py: off unless
+# KYOJIN_REQLOG_DIR names a directory. Its output accounting also feeds the end-of-stream summary here.
+from serve_reqlog import Lifecycle, ReqLog, StreamWriter, refusal_text, sanitize # noqa: E402
def _load_mimo():