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++
0.1.44: version, engine minimums, strata_kq packaging, the model menu
Niko1221289f8f03a76b
diff --git a/CMakeLists.txt b/CMakeLists.txtindex 16155bf23..2d2361228 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -8,7 +8,7 @@# below refuses anything older: silently building for a pre-Ampere arch would produce a binary that runs# and is wrong about its own performance, which is the worst of both outcomes.cmake_minimum_required(VERSION 3.24)-project(strata VERSION 0.1.43.1 LANGUAGES CXX)+project(strata VERSION 0.1.44 LANGUAGES CXX)# EXPERIMENTAL: the Intel Arc engine, the SYCL port in sycl/ (PR #423; icpx + oneMKL, docs/INTEL_ARC.md). It is its# own project that takes the unported sources from src/; with this on, nothing below is configured.option(STRATA_ENABLE_SYCL "EXPERIMENTAL: build the Intel Arc (SYCL) engine from sycl/ - docs/INTEL_ARC.md" OFF)diff --git a/Dockerfile b/Dockerfileindex 1c1d1d037..f1f002e93 100644--- a/Dockerfile+++ b/Dockerfile@@ -90,6 +90,8 @@ if vision != "none":eng = setup.ROOT / "engine"eng.mkdir(exist_ok=True)shutil.copy2(setup.ROOT / "build" / setup.EXE, eng / setup.EXE)+if (setup.ROOT / "build" / setup.KQ_LIB).exists(): # the K-quant MMQ prompt library (UD-Q4/Q5/Q6_K_XL files)+ shutil.copy2(setup.ROOT / "build" / setup.KQ_LIB, eng / setup.KQ_LIB)if vision != "none":shutil.copy2(setup.ROOT / "build-vision" / "bin" / setup.VEXE, eng / setup.VEXE)bindir = pathlib.Path(nvcc).parentdiff --git a/setup.py b/setup.pyindex 2e175abac..9df553a3d 100644--- a/setup.py+++ b/setup.py@@ -195,7 +195,7 @@ CUDA12_WHEELS = ["nvidia-cublas-cu12==12.9.1.4", "nvidia-cuda-runtime-cu12==12.9# toolkit the CUDA 12 zip is built with (cuBLAS 12.9.1.4, runtime 12.9.79). Not tested on such an old driver here.CUDA12_MIN_DRIVER = 528 if WIN else 525ENGINE12_DIR = "engine-cuda12"-MIN_ENGINE = (0, 1, 43, 1) # versions compare all numbers; v0.1.43.1: the adaptive overlap no longer collapses decode on pinned-host desktops (#1964 #1975), Windows PLE mmap stall (#1984), pinned prompt uploads (#1996), the I/O watchdog allowance; v0.1.43: adaptive-tier copies overlap on CUDA, P100 (sm_60) kernel tables, RDNA4 (gfx1200/gfx1201) defaults (route tail skip, measured PCIe share, 16K prompt chunks, fused IQ3 prompt experts); v0.1.42.1: the GGUF-in-place file tier on Windows unmaps every shard, dual-socket starts judge each NUMA node and STRATA_DROP_CACHE_ON_EXIT, tools/strata_bench.py; v0.1.42: STRATA_ROUTE_TAIL_SKIP=7 default on CUDA (+13-16% decode), the AMD 2-GPU checkpoint fix (H13), Phase 2 fixes and opt-ins; v0.1.41.1 (folded into 0.1.42): the #1576 card order, #1616 stage size, #1595 CPU share, #1630/#1607 Windows HIP chunk cap and commit-limit warning, #1603 parallel-request bookkeeping; v0.1.41: CPU prefill share on by default (NVIDIA, chunks < 1024), --batch-groups auto, the file tier read in batches on Windows, Pascal decode fix, per-arch tables; v0.1.40.3: the #1357 MTP router guard, the #1376 Windows HIP cache floor, #461 runtime DLLs, Intel A750 first-request fix; v0.1.40.2: F4 verify windows, the Linux file tier (#1194), the stager wait (#1057), #1264/#1201/#1139 fixes, opt-in CPU share (#1282), Intel Arc; v0.1.40: --resident-experts on a layer split with the split+resident variant (#848), --kv k8v4 with KV streaming (#711); v0.1.39: the #577 file-tier regression fixed, the OpenAI Responses API (#451, Codex), a reply stuck on one token ended (#606), the head before the arena (#620), effort_position (#458), --vram-reserve hot resize opt-in (#533), PR batch; v0.1.38: prompts faster (one gather per expert group #372, the first chunk's PLE rows beside layer 0 #374, DeltaNet three heads per thread #413), --kv q4_0 prompts on tensor cores (#452), Q5_0 experts on the GPU (#473), IQ4_XS on AVX-2 (#415), unbuffered expert loading on Windows (#357 #362), --peer-device (#531), a 6 GB card starts (#496), PR batch; v0.1.37: a silent engine is restarted (#481), Windows AMD counts the desktop's VRAM (#380 #377 #497), a steadier PCIe probe (#485), fixes #496 #495 #498 #505 #493; v0.1.36: a cancelled prompt logged as read so far (#471), the draft-head hint (#474), UPDATE.bat (#475), --expert-profile-save (#477); v0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB (#467), fixes #460 #459 #446 #447 #457 #448 #444; v0.1.34: AMD on Windows (a ready-made HIP engine), an MCP server for AI assistants (tools/strata_mcp.py), a shorter README; v0.1.33: a portable image encoder again (#411 #412), setup recommends instead of forcing (#406 #403 #364 #384), fixes #352 #365 #369 #371 #375 #393 #408 #414; v0.1.32: split prompts faster (#340), AMD router +12%, Unsloth Q4 in setup, faster Q4 prompts, #326/#327/#342/#344 fixes, PR batch; v0.1.31: Unsloth UD-Q4_K_XL (experimental), GGUF-in-place low-RAM mode, Windows GGUF load 2x, server race + tokenizer fixes, AMD intrinsics; v0.1.30: short prompts faster (streaming from 1024 tokens), resident low-RAM variant, multi-GPU session carve, RDNA4; v0.1.29: sampled answers faster (split top-k), #154 correctness fixes; v0.1.28: the expert cache reserves the draft head, a cancelled request no longer fails the next; v0.1.27: RTX 20 (sm_75) in the ready-made engine, the HIP build without CUDA headers; v0.1.26: the draft layer's prompt pass in batches; v0.1.25: faster prompts (grouping off the copy engine, fused hyper-connection kernels), AMD HIP backend, --kv k8v4; v0.1.24: long prompts faster (QSA select on tensor cores); v0.1.23: image requests honor sampling, 8 GB cards start, batched verify window; v0.1.22: faster prompts (tensor-core attention), multi-GPU across images/steering/KV streaming; v0.1.21: multi-GPU layer split (--gpus); v0.1.20: system-prompt checkpoint, PCIe probe, hit rate; v0.1.19: penalties+MIN_ENGINE = (0, 1, 44) # versions compare all numbers; v0.1.44: UD-Q4/Q5/Q6_K_XL and Q8_0 Unsloth files in setup (K-quant experts, MMQ prompt library strata_kq), NVFP4 packs, Qwen3.6-35B-A3B, Qwen-Image, Intel Arc A-series kernels, the pipelined-decode and latency work; v0.1.43.1: the adaptive overlap no longer collapses decode on pinned-host desktops (#1964 #1975), Windows PLE mmap stall (#1984), pinned prompt uploads (#1996), the I/O watchdog allowance; v0.1.43: adaptive-tier copies overlap on CUDA, P100 (sm_60) kernel tables, RDNA4 (gfx1200/gfx1201) defaults (route tail skip, measured PCIe share, 16K prompt chunks, fused IQ3 prompt experts); v0.1.42.1: the GGUF-in-place file tier on Windows unmaps every shard, dual-socket starts judge each NUMA node and STRATA_DROP_CACHE_ON_EXIT, tools/strata_bench.py; v0.1.42: STRATA_ROUTE_TAIL_SKIP=7 default on CUDA (+13-16% decode), the AMD 2-GPU checkpoint fix (H13), Phase 2 fixes and opt-ins; v0.1.41.1 (folded into 0.1.42): the #1576 card order, #1616 stage size, #1595 CPU share, #1630/#1607 Windows HIP chunk cap and commit-limit warning, #1603 parallel-request bookkeeping; v0.1.41: CPU prefill share on by default (NVIDIA, chunks < 1024), --batch-groups auto, the file tier read in batches on Windows, Pascal decode fix, per-arch tables; v0.1.40.3: the #1357 MTP router guard, the #1376 Windows HIP cache floor, #461 runtime DLLs, Intel A750 first-request fix; v0.1.40.2: F4 verify windows, the Linux file tier (#1194), the stager wait (#1057), #1264/#1201/#1139 fixes, opt-in CPU share (#1282), Intel Arc; v0.1.40: --resident-experts on a layer split with the split+resident variant (#848), --kv k8v4 with KV streaming (#711); v0.1.39: the #577 file-tier regression fixed, the OpenAI Responses API (#451, Codex), a reply stuck on one token ended (#606), the head before the arena (#620), effort_position (#458), --vram-reserve hot resize opt-in (#533), PR batch; v0.1.38: prompts faster (one gather per expert group #372, the first chunk's PLE rows beside layer 0 #374, DeltaNet three heads per thread #413), --kv q4_0 prompts on tensor cores (#452), Q5_0 experts on the GPU (#473), IQ4_XS on AVX-2 (#415), unbuffered expert loading on Windows (#357 #362), --peer-device (#531), a 6 GB card starts (#496), PR batch; v0.1.37: a silent engine is restarted (#481), Windows AMD counts the desktop's VRAM (#380 #377 #497), a steadier PCIe probe (#485), fixes #496 #495 #498 #505 #493; v0.1.36: a cancelled prompt logged as read so far (#471), the draft-head hint (#474), UPDATE.bat (#475), --expert-profile-save (#477); v0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB (#467), fixes #460 #459 #446 #447 #457 #448 #444; v0.1.34: AMD on Windows (a ready-made HIP engine), an MCP server for AI assistants (tools/strata_mcp.py), a shorter README; v0.1.33: a portable image encoder again (#411 #412), setup recommends instead of forcing (#406 #403 #364 #384), fixes #352 #365 #369 #371 #375 #393 #408 #414; v0.1.32: split prompts faster (#340), AMD router +12%, Unsloth Q4 in setup, faster Q4 prompts, #326/#327/#342/#344 fixes, PR batch; v0.1.31: Unsloth UD-Q4_K_XL (experimental), GGUF-in-place low-RAM mode, Windows GGUF load 2x, server race + tokenizer fixes, AMD intrinsics; v0.1.30: short prompts faster (streaming from 1024 tokens), resident low-RAM variant, multi-GPU session carve, RDNA4; v0.1.29: sampled answers faster (split top-k), #154 correctness fixes; v0.1.28: the expert cache reserves the draft head, a cancelled request no longer fails the next; v0.1.27: RTX 20 (sm_75) in the ready-made engine, the HIP build without CUDA headers; v0.1.26: the draft layer's prompt pass in batches; v0.1.25: faster prompts (grouping off the copy engine, fused hyper-connection kernels), AMD HIP backend, --kv k8v4; v0.1.24: long prompts faster (QSA select on tensor cores); v0.1.23: image requests honor sampling, 8 GB cards start, batched verify window; v0.1.22: faster prompts (tensor-core attention), multi-GPU across images/steering/KV streaming; v0.1.21: multi-GPU layer split (--gpus); v0.1.20: system-prompt checkpoint, PCIe probe, hit rate; v0.1.19: penalties# KV bytes per context token and attention layer: 8-bit 1056, rotated 4-bit 576, hybrid K8V4 (8-bit K, 4-bit V) 816KV_CELL_BYTES = {"q4_0": 576, "k8v4": 816}PY_PACKAGES = ["numpy", "jinja2", "regex", "pyyaml", "tqdm", "requests", "cmake", "ninja", "pillow", "psutil"]@@ -240,7 +240,7 @@ NVFP4_REPOS = {**_NVFP4_SHARED}},}# the first release engine with NVFP4 experts (a source build of this checkout has them whatever its number says)-NVFP4_ENGINE = (0, 1, 47)+NVFP4_ENGINE = (0, 1, 44)MODELS = {# the original model only for now: Swift 1.5's Q2_0 files split one layer's experts across the two shards, which@@ -405,16 +405,16 @@ FAMILIES = {"mmproj_hf": hf("ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-Coder-GGUF"),"mmproj": "mmproj-Qwen3.8-Flash-Next-BF16.gguf", "name": "qwen3.8-flash-next-coder","profile": "expert-profile-coder.bin"},- # Unsloth's UD-IQ4_XS (three shards, #621; a regular choice from 0.1.39) and the EXPERIMENTAL UD-Q4_K_XL (four)- # of the original model (docs/UNSLOTH_Q4.md); "experimental" and "vision" are per model (MODELS)+ # Unsloth's UD-IQ4_XS (three shards, #621), UD-Q4_K_XL (four), UD-Q5_K_XL, UD-Q6_K_XL and Q8_0 (six) of the original+ # model (docs/QUANTS.md): regular choices since f-quants; the shard count and "vision" are per model (MODELS)"unsloth": {"title": "Qwen3.8-Flash-Next (Unsloth)", "by": "Unsloth's 4- to 8-bit quantizations",- "about": "UD-IQ4_XS (94 GB download) to Q8_0 (188 GB): every expert in RAM from ~80 GB (UD-IQ4_XS) "- "to ~136 GB (Q8_0) of RAM, else part of them read from the SSD",+ "about": "UD-IQ4_XS, UD-Q4_K_XL, UD-Q5_K_XL, UD-Q6_K_XL or Q8_0 (94 to 188 GB downloads): every expert in "+ "RAM from ~80 GB (UD-IQ4_XS) to ~136 GB (Q8_0) of RAM, else part of them read from the SSD","hf": hf("unsloth/Qwen3.8-Flash-Next-GGUF") + "{q}/","file": "Qwen3.8-Flash-Next-{q}-0000{i}-of-00004.gguf", "shards": 4, "tag": "unsloth-","mmproj_hf": hf("ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF"),"mmproj": "mmproj-Qwen3.8-Flash-Next-BF16.gguf", "name": "qwen3.8-flash-next-unsloth",- "vision": False, "pack_args": ["--compat-bf16"],+ "vision": True, "pack_args": ["--compat-bf16"],"sha256": {**UNSLOTH_SHARDS, **UNSLOTH_IQ4_XS_SHARDS, **UNSLOTH_BIG_SHARDS}},# MODEL-UPDATE Phase 4: the original model with NVFP4 experts, as ready-made packs (NVFP4_REPOS): the files come# as the engine reads them (no GGUF to pack), each size has its own repository ("repo" in MODELS)@@ -2236,6 +2236,35 @@ STRIX_HALO_FAMILY, STRIX_HALO_MODEL = "unsloth", "UD-IQ4_XS" # the model docsSTRIX_HALO_MIN_GB = 80 # UD-IQ4_XS keeps all of its experts in memory from ~80 GB (its menu line says so)+def menu_families(hip: bool) -> list:+ """The families the model menu lists, in menu order. The NVFP4 packs run on NVIDIA cards only (the AMD and Intel+ engines have no NVFP4 kernels), so on those the menu does not offer them; `--family nvfp4` still says why not."""+ return [f for f in FAMILIES if not (hip and FAMILIES[f].get("ready"))]+++def nvfp4_card_note(gpu) -> str:+ """What the NVFP4 menu line says about this NVIDIA card: RTX 50 (Blackwell, sm_120) has FP4 tensor cores; on older+ RTX cards the experts run at 8-bit precision, which measured slower than UD-IQ4_XS (docs/NVFP4.md)."""+ try:+ arch = int((gpu or {}).get("arch") or 0)+ except (TypeError, ValueError):+ arch = 0+ if arch >= 120:+ return "native FP4 on this card"+ return "runs, but UD-IQ4_XS is faster on this card"+++def family_menu_note(family: str, hip: bool, gpu) -> str:+ """The card- and RAM-dependent tail of a family's line in the model menu."""+ if family == "nvfp4":+ d = MODELS["NVFP4"]+ return (f" [{nvfp4_card_note(gpu)}; {d['download_gb']:.0f} GB download, ~{d['ram_gb']} GB of RAM keeps every "+ "expert in RAM]")+ if family == "unsloth" and hip:+ return " [UD-IQ4_XS is the 4-bit choice on AMD and Intel cards; NVFP4 runs on NVIDIA only]"+ return ""++def strix_halo_recommends(gpu, ram) -> bool:"""Is UD-IQ4_XS the recommended model here: a Strix Halo whose unified memory (the OS's RAM plus the BIOS carve-out)holds it - the model docs/STRIX_HALO.md measures. A recommendation only: the menus still list every size."""@@ -3341,6 +3370,8 @@ def install_unpacked(tmp: Path, eng: Path) -> None:prev = eng / PREVIOUS_ENGINEnew = list(tmp.iterdir())old = [eng / p.name for p in new if p.name != PREVIOUS_ENGINE and (eng / p.name).exists()]+ if (eng / KQ_LIB).exists() and all(p.name != KQ_LIB for p in new): # a zip without strata_kq: an older one of+ old.append(eng / KQ_LIB) # another build would only be refused (kept in .previous too)shutil.rmtree(prev, ignore_errors=True)moved, placed = [], []try:@@ -5969,7 +6000,7 @@ def main() -> int:# ---- 2. the questionsstep(2, "your choices")- fams = list(FAMILIES)+ fams = menu_families(hip)if a.family:family = a.familyelse:@@ -5977,6 +6008,7 @@ def main() -> int:for i, f in enumerate(fams, 1):d = FAMILIES[f]say(f" {i}) {d['title']:20s} {d['by']} - {d['about']}" + (" [experimental]" if d.get("experimental") else "")+ + family_menu_note(f, hip, gpu)+ (f" (recommended for Strix Halo: {STRIX_HALO_MODEL})" if f == rec_fam and rec_fam != fams[0] else ""))for j, f in enumerate(OWN_PATH_FAMILIES, len(fams) + 1): # families with an engine path of their ownd = OWN_PATH_FAMILIES[f]diff --git a/tools/strata_mcp.py b/tools/strata_mcp.pyindex ea5e3c2dd..728958931 100644--- a/tools/strata_mcp.py+++ b/tools/strata_mcp.py@@ -74,6 +74,12 @@ FALLBACK_MODELS = {"Q8_0": {"about": "8-bit, the reference quality (every expert Q8_0); for a 192 GB PC","download_gb": 188.2, "ram_gb": 136, "arena_gb": 128.3, "families": ("unsloth",), "budget": True,"vision": True},+ "NVFP4": {"about": "4-bit NVFP4 experts, GPTQ (sergqwer's strata-nvfp4 pack); RTX 50 has FP4 tensor cores, other "+ "NVIDIA cards run it at 8-bit precision", "download_gb": 128.0, "ram_gb": 80, "arena_gb": 68.0,+ "families": ("nvfp4",), "vision": True},+ "NVFP4-NVIDIA": {"about": "NVIDIA's own NVFP4 checkpoint (plain rounding), converted by sergqwer; the same size "+ "and speed as NVFP4", "download_gb": 128.0, "ram_gb": 80, "arena_gb": 68.0,+ "families": ("nvfp4",), "vision": True},}FALLBACK_FAMILIES = {"qwen": {"title": "Qwen3.8-Flash-Next", "about": "the original model", "tag": ""},@@ -81,10 +87,14 @@ FALLBACK_FAMILIES = {"authors' numbers)", "tag": "swift-"},"coder": {"title": "Qwen3.8-Flash-Next Coder", "about": "half the experts (code, tools, images kept): needs ~32 GB ""of RAM, faster; weaker outside coding", "tag": "coder-"},- "unsloth": {"title": "Qwen3.8-Flash-Next (Unsloth)", "about": "UD-IQ4_XS (94 GB download) to Q8_0 (188 GB): every "- "expert in RAM from ~80 GB (UD-IQ4_XS) to ~136 GB "- "(Q8_0) of RAM, else part of them read from the SSD",- "tag": "unsloth-", "vision": False},+ "unsloth": {"title": "Qwen3.8-Flash-Next (Unsloth)", "about": "UD-IQ4_XS, UD-Q4_K_XL, UD-Q5_K_XL, UD-Q6_K_XL or Q8_0 "+ "(94 to 188 GB downloads): every expert in RAM from "+ "~80 GB (UD-IQ4_XS) to ~136 GB (Q8_0) of RAM, else "+ "part of them read from the SSD",+ "tag": "unsloth-", "vision": True},+ "nvfp4": {"title": "Qwen3.8-Flash-Next (NVFP4)", "about": "4-bit NVFP4 experts, NVIDIA cards; a 128 GB download, "+ "~80 GB of RAM to keep every expert in RAM",+ "tag": "nvfp4-"},}FALLBACK_CONTEXTS = [8192, 32768, 65536, 131072, 204800, 262144, 393216, 524288]BENCH_PROMPT = ("Write a short story (about 300 words) about a lighthouse keeper who finds a message in a bottle. "diff --git a/tools/test_setup_hotfix_tag.py b/tools/test_setup_hotfix_tag.pyindex e58c3977e..92af744b5 100644--- a/tools/test_setup_hotfix_tag.py+++ b/tools/test_setup_hotfix_tag.py@@ -23,8 +23,9 @@ class HotfixTag(unittest.TestCase):ver = tuple(int(x) for x in "0.1.40.3".split(".")) # a hotfix version has four numbers; MIN_ENGINE may have threeself.assertEqual(len(ver), 4)self.assertLess(ver, setup.MIN_ENGINE) # an installed hotfix of the older release is replaced- self.assertGreaterEqual((0, 1, 43, 1), setup.MIN_ENGINE) # the minimum itself (or a later hotfix) is accepted- self.assertLess((0, 1, 43), setup.MIN_ENGINE) # the release before the hotfix is replaced+ self.assertGreaterEqual((0, 1, 44), setup.MIN_ENGINE) # the minimum itself (or a later hotfix) is accepted+ self.assertLess((0, 1, 43, 1), setup.MIN_ENGINE) # the 0.1.43.1 hotfix is replaced+ self.assertLess((0, 1, 43), setup.MIN_ENGINE) # the release before is replacedself.assertLess((0, 1, 42, 1), setup.MIN_ENGINE) # 0.1.42.1 is replacedself.assertLess((0, 1, 40), setup.MIN_ENGINE) # an installed 0.1.40 engine is replaceddiff --git a/tools/test_setup_menu.py b/tools/test_setup_menu.pynew file mode 100644index 000000000..a4fa8dc95--- /dev/null+++ b/tools/test_setup_menu.py@@ -0,0 +1,117 @@+"""Tests for setup.py's model menu (0.1.44): the family order, NVFP4 hidden on AMD and Intel, the NVFP4 line's card note+(RTX 50 native FP4, older RTX slower than UD-IQ4_XS), the Unsloth sizes in order with images on, and the prebuilt+install removing a stale strata_kq library.++ python -m unittest tools.test_setup_menu+"""+from __future__ import annotations++import sys+import tempfile+import unittest+from pathlib import Path++ROOT = Path(__file__).resolve().parents[1]+sys.path.insert(0, str(ROOT))+sys.path.insert(0, str(ROOT / "tools"))+import setup # noqa: E402+++class FamilyOrder(unittest.TestCase):+ def test_the_menu_order_on_nvidia(self):+ fams = setup.menu_families(False) + list(setup.OWN_PATH_FAMILIES)+ self.assertEqual(fams, ["qwen", "swift", "coder", "unsloth", "nvfp4", "qwen36"])++ def test_the_default_stays_the_first_family(self):+ self.assertEqual(setup.menu_families(False)[0], "qwen")+ self.assertIn("GSQ-RCO", setup.FAMILIES["qwen"]["by"])++ def test_nvfp4_is_not_listed_on_amd_and_intel(self):+ fams = setup.menu_families(True)+ self.assertNotIn("nvfp4", fams)+ self.assertEqual(fams, ["qwen", "swift", "coder", "unsloth"])+ self.assertIn("nvfp4", setup.FAMILIES) # --family nvfp4 still exists, and says why not++ def test_the_unsloth_line_names_the_alternative_on_amd_and_intel(self):+ self.assertIn("UD-IQ4_XS", setup.family_menu_note("unsloth", True, None))+ self.assertEqual(setup.family_menu_note("unsloth", False, {"arch": 86}), "")+ self.assertEqual(setup.family_menu_note("coder", True, None), "")+++class Nvfp4Note(unittest.TestCase):+ def test_rtx_50_has_native_fp4(self):+ line = setup.family_menu_note("nvfp4", False, {"arch": 120, "name": "RTX 5070"})+ self.assertIn("native FP4 on this card", line)++ def test_older_rtx_runs_but_is_slower_than_ud_iq4_xs(self):+ for arch in (75, 86, 89):+ line = setup.family_menu_note("nvfp4", False, {"arch": arch})+ self.assertIn("runs, but UD-IQ4_XS is faster on this card", line, arch)+ self.assertNotIn("native FP4", line)++ def test_the_line_gives_the_download_and_the_ram_need(self):+ line = setup.family_menu_note("nvfp4", False, {"arch": 120})+ d = setup.MODELS["NVFP4"]+ self.assertIn(f"{d['download_gb']:.0f} GB download", line)+ self.assertIn(f"~{d['ram_gb']} GB of RAM", line)+++class UnslothSizes(unittest.TestCase):+ def test_the_sizes_in_menu_order(self):+ names = [m for m in setup.MODELS if "unsloth" in setup.MODELS[m].get("families", ())]+ self.assertEqual(names, ["UD-IQ4_XS", "UD-Q4_K_XL", "UD-Q5_K_XL", "UD-Q6_K_XL", "Q8_0"])++ def test_nothing_is_experimental_and_images_are_on(self):+ for m in ("UD-IQ4_XS", "UD-Q4_K_XL", "UD-Q5_K_XL", "UD-Q6_K_XL", "Q8_0"):+ d = setup.MODELS[m]+ self.assertFalse(d.get("experimental"), m)+ self.assertFalse(d.get("nvidia_only"), m)+ self.assertIs(d.get("vision"), True, m)+ self.assertIn("download_gb", d)+ self.assertIn("ram_gb", d)+ self.assertNotIn("experimental", setup.MODELS["UD-Q4_K_XL"]["about"].lower())+ self.assertTrue(setup.FAMILIES["unsloth"]["vision"])++ def test_the_family_line_lists_every_size(self):+ about = setup.FAMILIES["unsloth"]["about"]+ for m in ("UD-IQ4_XS", "UD-Q4_K_XL", "UD-Q5_K_XL", "UD-Q6_K_XL", "Q8_0"):+ self.assertIn(m, about)+++class EnginePlaceholders(unittest.TestCase):+ def test_every_engine_minimum_is_this_release(self):+ self.assertEqual(setup.NVFP4_ENGINE, (0, 1, 44))+ self.assertEqual(setup.MIN_ENGINE, (0, 1, 44))+ for m in ("UD-Q5_K_XL", "UD-Q6_K_XL", "NVFP4", "NVFP4-NVIDIA"):+ self.assertEqual(setup.MODELS[m]["engine"], (0, 1, 44), m)+ self.assertIn("0.1.44", (ROOT / "CMakeLists.txt").read_text(encoding="utf-8").split("project(strata VERSION", 1)[1][:12])+++class KqLibrary(unittest.TestCase):+ def test_a_zip_without_strata_kq_does_not_leave_an_old_one(self):+ with tempfile.TemporaryDirectory() as d:+ eng, tmp = Path(d) / "engine", Path(d) / "new"+ eng.mkdir()+ tmp.mkdir()+ (eng / setup.EXE).write_bytes(b"old")+ (eng / setup.KQ_LIB).write_bytes(b"old kq")+ (tmp / setup.EXE).write_bytes(b"new")+ setup.install_unpacked(tmp, eng)+ self.assertEqual((eng / setup.EXE).read_bytes(), b"new")+ self.assertFalse((eng / setup.KQ_LIB).exists())+ self.assertEqual((eng / setup.PREVIOUS_ENGINE / setup.KQ_LIB).read_bytes(), b"old kq") # a rollback gets it back++ def test_a_zip_with_strata_kq_replaces_it(self):+ with tempfile.TemporaryDirectory() as d:+ eng, tmp = Path(d) / "engine", Path(d) / "new"+ eng.mkdir()+ tmp.mkdir()+ (eng / setup.KQ_LIB).write_bytes(b"old kq")+ (tmp / setup.EXE).write_bytes(b"new")+ (tmp / setup.KQ_LIB).write_bytes(b"new kq")+ setup.install_unpacked(tmp, eng)+ self.assertEqual((eng / setup.KQ_LIB).read_bytes(), b"new kq")+++if __name__ == "__main__":+ unittest.main()diff --git a/tools/test_setup_unsloth.py b/tools/test_setup_unsloth.pyindex 59a403d80..243a55edd 100644--- a/tools/test_setup_unsloth.py+++ b/tools/test_setup_unsloth.py@@ -504,7 +504,7 @@ class IQ4XS(Base):self.assertEqual(code, 0, out)fam_line = next(ln for ln in out.splitlines() if ln.startswith(" 4) "))self.assertIn("Qwen3.8-Flash-Next (Unsloth)", fam_line)- self.assertIn("UD-IQ4_XS (94 GB download) to Q8_0", fam_line)+ self.assertIn("UD-IQ4_XS, UD-Q4_K_XL, UD-Q5_K_XL, UD-Q6_K_XL or Q8_0 (94 to 188 GB downloads)", fam_line)self.assertNotIn("[experimental]", out)size_lines = [ln for ln in out.splitlines()if any(ln.startswith(f" {i}) {m} ") for i in range(1, 6) for m in setup.MODELS)]