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

metal: --spec defaults to 2 on Metal builds (an explicit --spec N wins)

Niko12214eca56f46a06
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index a601fbccd..9128f368d 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -551,7 +551,11 @@ struct Options {
/// Plan v0.3 P6: speculative decoding with a verify window of this many tokens (the last accepted token and
/// spec-1 drafts); 0 = plain decode. `spec_oracle` drafts from a token file (the expected continuation, for
/// the exactness test); `spec_corrupt` N > 0 replaces every Nth draft with a wrong token.
+#if defined(STRATA_GPU_METAL)
+ int spec = 2; // Metal: a window of 2 by default (measured best on the M5 Max; an explicit --spec wins)
+#else
int spec = 0;
+#endif
/// --serve runs up to this many sequences at once, one token each per batch window (0 = off). A request
/// sent as `BGEN <slot> <max_new> ...` reads its prompt and its first token through the usual path, then
/// continues in slot <slot> of the batch windows (`BT <slot> <id>` lines, then `BDONE <slot> ...`).