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.

doc: serve DS4.1 through ds41_serve.sh on 128 GB machines

YanissAmz46f9af65811e
diff --git a/doc/DS41.md b/doc/DS41.md
index dd181ae..f018f53 100644
--- a/doc/DS41.md
+++ b/doc/DS41.md
@@ -53,6 +53,15 @@ python tools/ds41/validate_pack.py ./ds41-pack
```bash
source tools/strix_halo/env.sh
+DS41_PACK=./ds41-pack DS41_ENGRAM_DIR=./engram_fp8 DS41_PORT=8000 DS41_CTX=131072 DS41_DRAFT=5 tools/ds41/ds41_serve.sh
+```
+
+Use `ds41_serve.sh` on a 128 GB machine. It turns on the SSD expert tier (below), which `serve.py` alone does not do:
+without it the server tries to load all 172 GiB of experts into memory. The flags below are what `ds41_serve.sh`
+passes to `serve.py`; call `serve.py` directly only on a machine with enough memory for the whole pack, or after
+setting `EXL3_EXPERT_BUDGET_GIB` yourself.
+
+```bash
python tools/ds41/serve.py --model ./ds41-pack --loader ds41_serving:load_model --port 8000 -c 131072 --num-draft 5 \
--engine-opt engram_dir=./engram_fp8 --engine-opt prefill_chunk=32768
```
@@ -74,7 +83,7 @@ Sampling: temperature 1.0, top-p 1.0 (the model card values); the pack ships no
The pack (about 172 GiB) is larger than the 128 GB of unified memory, so the routed experts do not all fit in RAM. The
server keeps a pool of expert slots in memory and reads the experts that are missing from the NVMe when the router picks
-them. It is on by default when the pack is larger than the free memory (`DS41_TIER=auto`).
+them. `ds41_serve.sh` turns it on by default when the pack is larger than the free memory (`DS41_TIER=auto`).
- **Pool.** A slot pool of `DS41_BUDGET_GIB` (default: free memory minus 30 GiB). The non-expert weights (about 16 GiB), the
KV, the runtime and a staging ring sit outside the pool. Every expert is read bit for bit from the pack: nothing is pruned