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++

0.1.41 merge cleanups: bench key placeholder, B65 README author text, calibration time text, fixups.py regenerates the run-time spin bound

Niko12219b5e9ab13ac7
diff --git a/bench/results/2026-10-07-community-arc-b65-v01402/README.md b/bench/results/2026-10-07-community-arc-b65-v01402/README.md
index bbbd7a336..317b82e20 100644
--- a/bench/results/2026-10-07-community-arc-b65-v01402/README.md
+++ b/bench/results/2026-10-07-community-arc-b65-v01402/README.md
@@ -2,8 +2,7 @@
Measured on 2026-10-07 by timnevits. **Official upstream release**, commit
`e8ca9afd03d839d4f8dbbe82dffce7f8a3bafd7a`, with **no local engine patches**.
-Codex, an OpenAI AI agent, ran the tests and drafted and submitted this report
-with my approval. The measurements come from my B65 hardware.
+The measurements come from my B65 hardware.
Both memory profiles pass their bounded correctness checks. With the same 7K inputs, the 8K/prefill-512 profile delivers **43.49 decode tok/s**, versus **42.38** with the 262K/prefill-512 profile (-2.6%). The 8K/prefill-4096 profile reduces median 7K TTFT from **22.23 to 8.47 seconds**, with decode tradeoffs below.
diff --git a/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/run-262k.sh b/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/run-262k.sh
index d5c6ab4f6..11816f9af 100755
--- a/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/run-262k.sh
+++ b/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/run-262k.sh
@@ -7,7 +7,7 @@
# --ple-io ram n-gram table in RAM
# --vision --vram-reserve-mib 700 image encoder resident; costs VRAM the expert cache would take
# reasoning_budget_tokens 12000 leaves room for an answer inside the reasoning cap
-# api_key shrisha required, the port is open to the LAN
+# api_key <your-key> required, the port is open to the LAN
#
# STRATA_STAGE_TRIM=1 (PR #639): each card loads only its own layers dense weights
# instead of a full copy, returning ~3.4 GB per card to the expert cache.
diff --git a/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/strata-262k-pleio.json b/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/strata-262k-pleio.json
index e22c9a8f6..604bc02ed 100644
--- a/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/strata-262k-pleio.json
+++ b/bench/results/2026-10-08-community-2x-titan-rtx-0.1.40.3/strata-262k-pleio.json
@@ -47,7 +47,7 @@
"gpus_asked": true,
"layer_split": "auto",
"host": "0.0.0.0",
- "api_key": "shrisha",
+ "api_key": "<your-key>",
"vision": {
"exe": "/mnt/1TB/src/Strata/engine/strata-vision",
"mmproj": "/mnt/1TB/models/mmproj-Qwen3.8-Flash-Next-BF16.gguf",
diff --git a/docs/DETAILS.md b/docs/DETAILS.md
index c579c523a..7c5773e89 100644
--- a/docs/DETAILS.md
+++ b/docs/DETAILS.md
@@ -457,7 +457,7 @@ START-HERE.bat --gguf-dir D:\models\IQ2_XS use GGUF files you already have
START-HERE.bat --data-dir E:\Strata-data keep the model files somewhere else
START-HERE.bat --port 8081 another port
START-HERE.bat --gpu 1 another GPU (numbered as nvidia-smi; setup picks the one with the most VRAM)
-START-HERE.bat --calibrate tune the engine for this PC (about 5-10 minutes), then start
+START-HERE.bat --calibrate tune the engine for this PC (about 15-30 minutes, longer on a slow card), then start
```
With more than one model installed, it asks which one to start. `run-<model>.bat` starts a model directly.
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index ca16e3c1e..11f0e0fd5 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -222,7 +222,7 @@ With `--yes` setup takes the recommended answer to every question.
## Tuning for your PC
Every PC is different: `START-HERE.bat --calibrate` (Linux: `./setup.sh --calibrate`) measures a few engine settings
-on yours and keeps the fastest (about 5-10 minutes; on an RTX 5070 with a Ryzen 5 7600 it made the Coder 7% faster).
+on yours and keeps the fastest (about 15-30 minutes, longer on a slow card; on an RTX 5070 with a Ryzen 5 7600 it made the Coder 7% faster).
It keeps a setting only when it is more than 3% faster, and the result is remembered per PC and model, so updates
keep it. Measuring the CPU worker count needs a fresh engine, so the model is loaded more than once: the PC is
busy, and can stop responding for a minute or two, once per restart. When it finishes it **starts the model**,
@@ -246,7 +246,7 @@ START-HERE.bat --no-browser do not open the chat page when t
--browser undoes it)
START-HERE.bat --setup --backend hip the AMD engine on a PC that also has an NVIDIA card
START-HERE.bat --setup --host 0.0.0.0 --api-key <secret> reachable from other devices, with a key
-START-HERE.bat --calibrate tune the engine for this PC (about 5-10 minutes), then start
+START-HERE.bat --calibrate tune the engine for this PC (about 15-30 minutes, longer on a slow card), then start
START-HERE.bat --check only check this PC
```
diff --git a/docs/MODELS.md b/docs/MODELS.md
index 921b55db2..93af447c7 100644
--- a/docs/MODELS.md
+++ b/docs/MODELS.md
@@ -51,7 +51,7 @@ A card with more VRAM is faster, because more of the model fits on the GPU: an R
RX 9060 XT, RX 6900 XT) are in [AMD_HIP.md](AMD_HIP.md#rdna4-gfx1201).
Every PC is different: `START-HERE.bat --calibrate` measures a few engine settings on yours and keeps the fastest
-(about 5-10 minutes; on the PC above it made the Coder 7% faster; NVIDIA cards for now). Measured Strata on your own
+(about 15-30 minutes, longer on a slow card; on the PC above it made the Coder 7% faster; NVIDIA cards for now). Measured Strata on your own
PC? See [Community benchmark results](COMMUNITY_BENCHMARKS.md) for a report template and how to share your results
in a pull request.
diff --git a/setup.py b/setup.py
index a2df0e035..22b751ce2 100644
--- a/setup.py
+++ b/setup.py
@@ -3934,7 +3934,7 @@ def calibrate_config(cfg_path: Path) -> bool:
cfg = json.loads(cfg_path.read_text(encoding="utf-8-sig"))
say()
say(" Tuning Strata for this PC: the output speed is measured with a few engine settings (the PCIe share, the")
- say(" draft depth, the CPU threads, the expert cache). It takes about 10 minutes; the PC is busy meanwhile.")
+ say(" draft depth, the CPU threads, the expert cache). It takes roughly 15-30 minutes (3 rounds of each value); the PC is busy meanwhile.")
try:
since = os.path.getsize(cfg["log"]) if cfg.get("log") and os.path.isfile(cfg["log"]) else 0
except OSError:
@@ -4641,7 +4641,7 @@ def main() -> int:
help="where the ready-made engine is (a URL folder or a local folder)")
ap.add_argument("--check", action="store_true", help="only check this PC and exit")
ap.add_argument("--calibrate", action="store_true",
- help="tune the engine's settings for this PC (about 5-10 minutes), then start the model")
+ help="tune the engine's settings for this PC (about 15-30 minutes, longer on a slow card), then start the model")
ap.add_argument("--draft-vocab", choices=list(DRAFT_VOCABS),
help="the draft layer's tokens: cjk = with Chinese, Japanese and Korean (default), en = English "
"and code only (~110 MiB less VRAM, English answers 1-2%% faster), cyrillic = English, code "
@@ -5521,7 +5521,7 @@ def main() -> int:
script = write_run_script(tag, cfg_path, port, cfg.get("open_browser") is not False)
# offered only when someone answers: --yes installs and adopted earlier installs are not held up by it
if cal is None and not hip and not a.no_start and not a.yes and ask(
- "Tune Strata for this PC now? It measures a few engine settings (about 5-10 minutes; the PC is busy "
+ "Tune Strata for this PC now? It measures a few engine settings (about 15-30 minutes, longer on a slow card; the PC is busy "
"meanwhile; later: START-HERE --calibrate)", ["y", "n"], "y", a.yes) == "y":
tuned = calibrate_config(cfg_path)
else:
diff --git a/sycl/tools/fixups.py b/sycl/tools/fixups.py
index 4ccbdd74c..3b9e00c1b 100644
--- a/sycl/tools/fixups.py
+++ b/sycl/tools/fixups.py
@@ -129,8 +129,29 @@ def gr_kernel_names(s):
return pat.sub(lambda m: (">>(" if m.group(2) == "gr_down_staged_kernel" else f", dpct_kernel_scalar<{m.group(3)}>>>(")
+ m.group(1) + m.group(2) + "(", s)
edit("src/kernels/cuda/fused_gr.dp.cpp", gr_kernel_names)
-edit("src/kernels/cuda/elementwise.dp.cpp", doorbell)
-edit("src/kernels/cuda/verify_kernels.dp.cpp", doorbell)
+# 7c'. #1397: the bound of those spins is chosen per device at run time (strata::spin_max(queue), sycl_doorbell.hpp), not the
+# build's constant kSpinMax: each waiting kernel takes it as a `uint32_t spin_max` argument and its launcher passes
+# strata::spin_max(*strata::q_of(stream)). Idempotent: a file that already has the argument is left alone.
+def spin_bound_at_run_time(s):
+ for kernel, launcher in (("doorbell_wait_kernel", "doorbell_wait"), ("wait_flag_ge_or_kernel", "wait_flag_ge_or"),
+ ("wait_flag_ge_kernel", "wait_flag_ge")):
+ sig = re.compile(r"(__dpct_inline__ void " + kernel + r"\([^)]*?)\)(\s*\{)")
+ m = sig.search(s)
+ if m and "spin_max" not in m.group(1):
+ s = s[:m.start()] + m.group(1) + ", uint32_t spin_max)" + m.group(2) + s[m.end():]
+ call = re.compile(r"(\b" + kernel + r"\((?:[^()]|\([^()]*\))*?)\);")
+ s = call.sub(lambda c: c.group(0) if "spin_max" in c.group(1) else c.group(1) + ", spin_max);", s)
+ head = re.compile(r"^(void " + launcher + r"\([^)]*\)(?: try)? \{\n)", re.M)
+ h = head.search(s)
+ if h and "strata::spin_max(" not in s[h.end():h.end() + 200]:
+ at = h.end()
+ guard = re.match(r" if \([^\n]*\) return;\n", s[at:]) # a null-argument guard stays first
+ if guard:
+ at += guard.end()
+ s = s[:at] + " const uint32_t spin_max = strata::spin_max(*strata::q_of(stream));\n" + s[at:]
+ return s.replace("strata::kSpinMax", "spin_max")
+edit("src/kernels/cuda/elementwise.dp.cpp", lambda s: spin_bound_at_run_time(doorbell(s)))
+edit("src/kernels/cuda/verify_kernels.dp.cpp", lambda s: spin_bound_at_run_time(doorbell(s)))
# 7d. cudaMemcpy / cudaMemset are synchronous; dpct emitted `get_in_order_queue().memcpy(...)` with no wait where
# the source was pageable ("call wait() if needed"). The streaming expert source hands out ring-buffer blobs,