Skip to content

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: a 200K context choice between the 128K rule and 256K (#406)

MingShi_621f84e62d61
diff --git a/setup.py b/setup.py
index 8b26d858a..7668c3402 100644
--- a/setup.py
+++ b/setup.py
@@ -178,7 +178,9 @@ UNSLOTH_RAM_LEFT_GB = 24 # RAM beside the budget: the OS, the engine, and
# from the final context (final / 262144, at least 1) itself (below), keeps an explicit
# --rope-scaling/--rope-scale, and refuses an explicit --rope-scaling none there - the stock angles past
# the trained range are out of spec.
-CONTEXTS = [8192, 32768, 65536, 131072, 262144, 393216, 524288]
+# 204800 (200K) sits between 128K and 256K: it is inside the trained 262144, so it needs no rope scaling and
+# costs ~2.8 GB of 8-bit KV with IQ3_S (vs ~3.6 GB at 256K) - a middle step for PCs that cannot hold 256K.
+CONTEXTS = [8192, 32768, 65536, 131072, 204800, 262144, 393216, 524288]
# The model families: the same architecture, weights in the same three GSQ-RCO sizes, different files.
FAMILIES = {
"qwen": {"title": "Qwen3.8-Flash-Next", "by": "Qwen; GSQ-RCO quants by ISTA-DASLab",
diff --git a/tools/strata_mcp.py b/tools/strata_mcp.py
index 6857715ae..563a598d6 100644
--- a/tools/strata_mcp.py
+++ b/tools/strata_mcp.py
@@ -78,7 +78,7 @@ FALLBACK_FAMILIES = {
"(UD-Q4_K_XL, 111 GB: experimental)",
"tag": "unsloth-", "vision": False},
}
-FALLBACK_CONTEXTS = [8192, 32768, 65536, 131072, 262144, 393216, 524288]
+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. "
"Plain prose, no title.")
diff --git a/tools/test_setup_risk.py b/tools/test_setup_risk.py
index 3e569a982..6ba79d0f0 100644
--- a/tools/test_setup_risk.py
+++ b/tools/test_setup_risk.py
@@ -106,13 +106,25 @@ class Context(unittest.TestCase):
def test_a_picked_256k_is_kept_and_the_menu_says_the_risk(self):
code, out, cfg, asked = install(self.RAM64, self.GPU32, ["--family", "qwen", "--model", "IQ3_S", "--no-start"],
- answers={"Context?": "5"})
+ answers={"Context?": "6"})
self.assertEqual(code, 0, out)
self.assertEqual(arg(cfg, "--max-context"), "262144")
self.assertIn("256K tokens (needs ~78 GB RAM, this PC has 64: may run out of memory)", out)
self.assertIn("128K tokens (recommended for your GPU)\n", out)
self.assertIn("Kept as you chose", out)
+ def test_a_200k_choice_is_kept(self):
+ """#406: 200K was added between the 128K rule and 256K - it is inside the trained 262144, so no rope scaling,
+ and a pick of it is kept with the note 256K gets instead of being capped to 128K."""
+ code, out, cfg, _ = install(self.RAM64, self.GPU32, ["--family", "qwen", "--model", "IQ3_S", "--no-start"],
+ answers={"Context?": "5"})
+ self.assertEqual(code, 0, out)
+ self.assertEqual(arg(cfg, "--max-context"), "204800")
+ self.assertNotIn("--rope-scaling", cfg["args"])
+ self.assertIn("200K tokens (needs ~77 GB RAM, this PC has 64: may run out of memory)", out)
+ self.assertIn("200K with IQ3_S needs ~77 GB of RAM by setup's estimate", out)
+ self.assertIn("Kept as you chose", out)
+
def test_low_ram_mode_keeps_262k_without_a_ram_note(self):
ram, found = PROFILES["32GB-2x24GB"] # #364
code, out, cfg, _ = install(ram, found, ["--family", "qwen", "--model", "IQ3_XXS", "--no-start",