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++
setup: --parallel is not offered where the card holds every expert for one session only (4 slots at 128K on a 32 GB card moved all but 15 experts per layer to the CPU: 81 tok/s against ~180)
Niko12216eb34c7036db
diff --git a/setup.py b/setup.pyindex 8943c5049..c02bc1c3b 100644--- a/setup.py+++ b/setup.py@@ -5605,13 +5605,18 @@ def own_path_parallel_fits_all(fam: dict, model: str, vram_gb: float, ctx: int,def own_path_parallel_recommend(fam: dict, model: str, vram_gb: float, ctx: int) -> int:"""How many requests at once to recommend: 0 = none (the card cannot hold even two slots). Where every routed expertstill fits in VRAM with the slots' sessions, up to 4 (a batch reads each expert once for all its rows). On a card- that does not hold every expert (the hybrid mode) it is recommended too, as an offer with its price said: measured on+ that does not hold every expert even for one session (the hybrid mode already) it is recommended too, as an offer with+ its price said: measured onan RTX 3060 12 GB, 4 requests together run ~1.5x as fast as one, a request alone ~5% slower, because the slots takeVRAM from the expert cache; up to the count whose sessions leave PARALLEL_SMALL_ROOM_GB of the card."""slot = own_path_parallel_slot_gb(fam, ctx)best = max([n for n in (2, 3, 4) if own_path_parallel_fits_all(fam, model, vram_gb, ctx, n)], default=0)if best:return best+ if own_path_parallel_fits_all(fam, model, vram_gb, ctx, 0):+ return 0 # a card that holds every expert for one session only: more sessions would push experts to the CPU+ # (measured on a 32 GB R9700 at 128K: 4 slots left 15 of 256 experts per layer, decode 81 tok/s+ # against ~180): not offered there, a number asked for is keptreturn max([n for n in (2, 3, 4) if n * slot + PARALLEL_SMALL_ROOM_GB <= vram_gb], default=0)@@ -5622,8 +5627,10 @@ def own_path_parallel_note(a_parallel, fam: dict, model: str, vram_gb: float, ctslot = own_path_parallel_slot_gb(fam, ctx)if a_parallel is None or a_parallel <= 1:if not rec:- return ["Several requests at once (opt-in, --parallel N): left at one at a time, because this card has no room for "- f"more sessions (each takes ~{slot:.1f} GB of VRAM at this context)."]+ return ["Several requests at once (opt-in, --parallel N): left at one at a time, because this card cannot spare "+ f"the room: each session takes ~{slot:.1f} GB of VRAM at this context, and where the card holds every "+ "expert only for one session, more would move experts to the CPU and slow every request a lot (a "+ "smaller context leaves room for more; docs/QWEN36.md)."]if own_path_parallel_fits_all(fam, model, vram_gb, ctx, rec):return [f"Several requests at once (opt-in): --parallel {rec} decodes up to {rec} together instead of one after "f"the other (each takes ~{slot:.1f} GB of VRAM at this context; docs/BATCHING.md)."]diff --git a/tools/test_setup_qwen36.py b/tools/test_setup_qwen36.pyindex 948eb747b..7b31f4796 100644--- a/tools/test_setup_qwen36.py+++ b/tools/test_setup_qwen36.py@@ -241,6 +241,9 @@ class InstallOwnPath(unittest.TestCase):self.assertEqual(setup.own_path_parallel_recommend(fam, "UD-Q4_K_XL", 12.0, 32768), 4)self.assertEqual(setup.own_path_parallel_recommend(fam, "UD-Q4_K_XL", 12.0, 131072), 0)self.assertEqual(setup.own_path_parallel_recommend(fam, "UD-Q4_K_XL", 8.0, 32768), 0)+ # a card that holds every expert for ONE session only is not offered more: 4 slots on a 32 GB R9700 at 128K left+ # 15 of 256 experts per layer in VRAM and decode ran 81 tok/s against ~180+ self.assertEqual(setup.own_path_parallel_recommend(fam, "UD-Q4_K_XL", 31.9, 131072), 0)rc, out = self.install(model="UD-Q4_K_XL", vram=12.0, vision="no")self.assertNotIn("parallel", self.cfg)self.assertIn("--parallel 4", out)