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.

Qwen serve: log a prefix disk save that held the driver for 250 ms or more

YanissAmze6a6ca841b2b
diff --git a/tools/qwen/serve.py b/tools/qwen/serve.py
index 8d7e358..0221794 100644
--- a/tools/qwen/serve.py
+++ b/tools/qwen/serve.py
@@ -941,9 +941,12 @@ class QwenEngine:
if pd is None or ids is None:
return
try:
- await self._post(pd.save, ids)
+ r = await self._post(pd.save, ids)
except Exception as exc: # noqa: BLE001
print(f"qserve: prefix disk save failed: {type(exc).__name__}: {exc}", file=sys.stderr, flush=True)
+ return
+ if r and r.get("ms", 0) >= 250: # the driver, and with it every other user's decode, waited this long
+ print(f"qserve: prefix disk save pages={r['saved']} {r['ms']:.0f} ms", file=sys.stderr, flush=True)
async def reset_prefix_cache(self) -> None:
"""Forget every cached prompt prefix (page table, recurrent checkpoints, n-gram index): a fresh Generator, the path