Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
serve: engine_ready_s in the run config (DeepSeek-V4.1-Flash reads 300 GB at start; setup writes 3600)
Niko1221a4c933641674
diff --git a/serve/server.py b/serve/server.pyindex f41d96dfc..6dc058a33 100644--- a/serve/server.py+++ b/serve/server.py@@ -2902,6 +2902,18 @@ def layer_split_value(cfg: dict) -> str:return ",".join(str(x) for x in vals)+def apply_ready_timeout(cfg: dict) -> None:+ """The config's "engine_ready_s": how long a start may take before READY (default ENGINE_READY_S, 900). A model of 300+ GB read+ from a slow disk (DeepSeek-V4.1-Flash: setup writes 3600) needs more. ValueError for anything but a number > 0."""+ global ENGINE_READY_S+ v = cfg.get("engine_ready_s")+ if v is None:+ return+ if isinstance(v, bool) or not isinstance(v, (int, float)) or not v > 0:+ raise ValueError(f'"engine_ready_s" must be a number of seconds above 0, not {v!r}')+ ENGINE_READY_S = float(v)++def layer_split_of(cfg: dict) -> bool:"""Several GPUs in the config are a layer split, unless the args put the later card(s) to another use: with--peer-device the second card is an expert-cache tier, and the engine refuses that beside --layer-split (#665)."""@@ -8004,6 +8016,7 @@ def main(argv=None, *, lifecycle_event=None, interrupt_exit_code: int = 0) -> inexe = cfg["exe"] if os.path.isabs(cfg["exe"]) else os.path.abspath(os.path.join(cfg.get("cwd") or ".", cfg["exe"]))try:silence = engine_silence_s(cfg) # #481: checked before the (minutes-long) start+ apply_ready_timeout(cfg)except ValueError as e:raise SystemExit(f"[strata] config {e}")try:diff --git a/serve/test_dsv41.py b/serve/test_dsv41.pyindex 71c6a12fe..ae9040473 100644--- a/serve/test_dsv41.py+++ b/serve/test_dsv41.py@@ -280,6 +280,22 @@ class Parser(unittest.TestCase):[("get_weather", {"city": "Rome"})])+class ReadyTimeout(unittest.TestCase):+ """A 300+ GB model read from a slow disk needs more than the default 900 s before READY: the config's "engine_ready_s"."""++ def test_the_config_sets_it_and_a_bad_value_is_said(self):+ from serve import server+ before = server.ENGINE_READY_S+ self.addCleanup(setattr, server, "ENGINE_READY_S", before)+ server.apply_ready_timeout({})+ self.assertEqual(server.ENGINE_READY_S, before)+ server.apply_ready_timeout({"engine_ready_s": 3600})+ self.assertEqual(server.ENGINE_READY_S, 3600.0)+ for bad in (0, -5, "soon", True):+ with self.assertRaises(ValueError):+ server.apply_ready_timeout({"engine_ready_s": bad})++class Api(unittest.TestCase):"""Both APIs against a fake engine that replays scripted DeepSeek text."""diff --git a/setup.py b/setup.pyindex 6f7eb0c0a..21fe40512 100644--- a/setup.py+++ b/setup.py@@ -7350,7 +7350,7 @@ def install_dsv41(a, family, gpu, hip, amd, cuda_tk, multi, port, ram, adopted,args = ["--pack", str(pack), "--max-context", str(ctx), "--eos", "1", *plan["args"]]cfg = {"exe": str(exe), "args": args, "cwd": str(ROOT), "tokenizer": str(pack / "tokenizer"),"model_name": fam["name"], "arch": fam["arch"], "log": str(home() / f"strata-{tag.lower()}.log"),- "lib_dirs": lib_dirs, "port": port}+ "lib_dirs": lib_dirs, "port": port, "engine_ready_s": 3600} # 300+ GB read from the files: a slow disk needs its timeif cuda_tk == 12:cfg["cuda"] = 12if hip:diff --git a/tools/test_setup_dsv41.py b/tools/test_setup_dsv41.pyindex 7b403c89b..fd9e86865 100644--- a/tools/test_setup_dsv41.py+++ b/tools/test_setup_dsv41.py@@ -200,6 +200,7 @@ class Install(unittest.TestCase):self.assertEqual(a[a.index("--tp") + 1], "2")self.assertTrue(Path(a[a.index("--pack") + 1]).match("*packs/deepseek-v4.1-flash-ud-q8_k_xl"))self.assertEqual(self.cfg["gpu"], [0, 1, 2, 3])+ self.assertEqual(self.cfg["engine_ready_s"], 3600)self.assertEqual(self.cfg["backend"], "hip")self.assertTrue(self.cfg["tokenizer"].endswith("tokenizer"))self.assertNotIn("--vision", a)