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++
mac plan: measured numbers and expert share of the 0.2.7.1 build (68-69 GB on a 128 GB Mac)
Niko122148c8e858439f
diff --git a/strata_control/dsv41_fit.py b/strata_control/dsv41_fit.pyindex 06d6611a0..858d97f52 100644--- a/strata_control/dsv41_fit.py+++ b/strata_control/dsv41_fit.py@@ -494,19 +494,19 @@ MAC_PACKS: dict[str, dict[str, Any]] = {"IQ2_XS": {"name": "2.25 bpw (IQ2_XS), the quality one", "routed_gb": 149.06, "backbone_gb": 155.23, "bpw": 2.25},}MAC_ENGRAM_GB = 110.60 # the same Engram table for all three, read row by row off the SSD-MAC_ENGINE_FOOTPRINT_GB = 10.0 # the process' anonymous memory after the load (Metal buffers, host buffers, the KV cache)+MAC_ENGINE_FOOTPRINT_GB = 12.0 # the process' anonymous memory after the load (Metal buffers, host buffers, the KV cache)MAC_DEVICE_SHARE = 0.75 # recommendedMaxWorkingSetSize as a share of the RAM (107.5 of 128 GB on the M5 Max)MAC_FILECACHE_FLOOR_GB = 37.2 # vm.vm_page_filecache_min on the 128 GB M5 MaxMAC_HEADROOM_GB = 12.0 # beside that floor: macOS itself and one more program-MAC_MEASURED = ("M5 Max, 128 GB, 2.25 bpw, 2026-10-25: 14.4-15.8 tokens/s for an answer (12.4-12.6 on agent "- "work), a 3,000-token prompt at 380-382 tokens/s, 32,000 at 306; the engine kept 71.4 GB of the "- "experts resident and read 93.4 MB a token from the SSD")+MAC_MEASURED = ("M5 Max, 128 GB, 2.25 bpw: 13-15 tokens/s for a short answer (10-12 after a long prompt), a 3,000-token "+ "prompt at about 310 tokens/s, 32,000 at about 720; the engine kept about 68 GB of the experts resident "+ "and read about 110 MB a token from the SSD")-# What each pack did on that Mac (the owner's measurements, 2026-10-25/26; the release build's numbers replace them in MAC_MEASURED_PACK).+# What each pack did on that Mac (measured on the 0.2.7.1 build, 2026-10-27, product flags, frozen placement).MAC_MEASURED_PACK = {- "IQ2_XXS": ("M5 Max, 128 GB, 2.00 bpw: 19-20 tokens/s for a short answer (14-17 after a long prompt), a 3,000-token prompt at 362-377 "- "tokens/s, 32,000 at 303; the engine kept 71.4 GB of the experts resident and read 40 MB a token from the SSD"),+ "IQ2_XXS": ("M5 Max, 128 GB, 2.00 bpw: 15-18 tokens/s for a short answer (14-15 after a long prompt), a 3,000-token prompt at about 270 "+ "tokens/s, 32,000 at about 630; the engine kept about 69 GB of the experts resident and read about 48 MB a token from the SSD"),"IQ2_XS": MAC_MEASURED,}@@ -514,7 +514,7 @@ MAC_MEASURED_PACK = {def mac_expert_cap_gb(ram_gb: float) -> float:"""The expert budget the engine will pick on a Mac of `ram_gb` (GiB, as the rest of the app reports memory), indecimal GB: the RAM less what macOS keeps, less the process' own footprint. Mirrors metal_expert_cap() with its- big-Mac rule (>= 64 GB: 40% left, at least the file-cache floor + 12 GB). 128 GiB gives the 71.4 GB measured on+ big-Mac rule (>= 64 GB: 40% left, at least the file-cache floor + 12 GB). 128 GiB gives the 68-69 GB measured onthe M5 Max."""gib = 1.073741824p = float(ram_gb) * gibdiff --git a/tests/terminal/test_dsv41_fit_mac.py b/tests/terminal/test_dsv41_fit_mac.pyindex 7545673ae..2e81c8091 100644--- a/tests/terminal/test_dsv41_fit_mac.py+++ b/tests/terminal/test_dsv41_fit_mac.py@@ -1,6 +1,6 @@"""DeepSeek-V4.1-Flash on an Apple Silicon Mac: the fit numbers (`strata_control/dsv41_fit.py`, `mac_expert_cap_gb` and-`mac_plan`). The cap mirrors the engine's own rule, so 128 GiB must give the 71.4 GB of VRAM experts measured on the M5-Max on 2026-10-25. Pure: nothing here builds, downloads or starts anything."""+`mac_plan`). The cap mirrors the engine's own rule, so 128 GiB must give the 68-69 GB of VRAM experts measured on the M5+Max on 2026-10-27. Pure: nothing here builds, downloads or starts anything."""from __future__ import annotations@@ -11,7 +11,7 @@ from strata_control import dsv41_fit as Fclass MacExpertCap(unittest.TestCase):def test_the_m5_max_gives_the_measured_71_4_gb(self):- self.assertAlmostEqual(F.mac_expert_cap_gb(128), 71.4, delta=0.3)+ self.assertAlmostEqual(F.mac_expert_cap_gb(128), 69.4, delta=0.3)def test_a_32_gb_mac_mini_keeps_little(self):# 32 GiB: leave = 15% (4.8 GiB = 5.15 GB) and the working set caps it at 3/4 of 34.4 GB@@ -31,8 +31,8 @@ class MacPlan(unittest.TestCase):def test_the_default_pack_on_the_m5_max_streams(self):p = F.mac_plan(128, "IQ2_XS")self.assertEqual(p["verdict"], "streams")- self.assertAlmostEqual(p["resident_gb"], 71.4, delta=0.3)- self.assertAlmostEqual(p["streaming_gb"], 149.06 - 71.4, delta=0.3)+ self.assertAlmostEqual(p["resident_gb"], 69.4, delta=0.3)+ self.assertAlmostEqual(p["streaming_gb"], 149.06 - 69.4, delta=0.3)self.assertEqual(p["dense_gb"], 6.17)self.assertIn("streams", p["words"])self.assertIn("M5 Max", p["words"])@@ -78,7 +78,7 @@ class MacInThePlan(unittest.TestCase):p = F.plan(self.card(128), 128, 900.0, 8192, model="IST-DAS-2.00bpw")self.assertTrue(p["mac"])self.assertEqual(p["mac_verdict"], "streams")- self.assertAlmostEqual(p["vram_experts_gb"], 71.5, delta=0.5)+ self.assertAlmostEqual(p["vram_experts_gb"], 69.5, delta=0.5)self.assertAlmostEqual(p["streamed_gb"], p["experts_gb"] - p["vram_experts_gb"], delta=0.2)self.assertEqual(p["tp"], 1)self.assertEqual(p["args"], [])@@ -95,7 +95,7 @@ class MacInThePlan(unittest.TestCase):self.assertFalse(any("refuse" in w.lower() for w in p["warnings"]))def test_the_file_cache_floor_grows_with_the_memory(self):- self.assertAlmostEqual(F.mac_expert_cap_gb(128), 71.4, delta=0.3) # the measured M5 Max+ self.assertAlmostEqual(F.mac_expert_cap_gb(128), 69.4, delta=0.3) # the measured M5 Maxself.assertGreater(F.mac_expert_cap_gb(64), 20.0) # a 64 GB Mac is not told it keeps nothingself.assertLess(F.mac_expert_cap_gb(64), F.mac_expert_cap_gb(96))