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

Owner decision. Only the Options default under STRATA_GPU_METAL; CUDA/HIP/SYCL keep 0: on P2003 the CUDA
generate.cpp translation unit preprocesses IDENTICAL and its object is byte-IDENTICAL.

M5 Max, MTP, 200 tokens, greedy output equal to no MTP in every run: Q2_0 114.0 / 107.9 tok/s (prompt1 / story,
--suffix-draft 0; was 112.0 / 86.2 at --spec 4), 119.5 / 108.2 with the default suffix drafter; IQ3_XXS 103.5 /
96.9, 108.9 / 97.0 (was 110.2 / 87.4).
This commit is contained in:
Niko1221 committed 2026-10-12 18:30:51 +02:00
1 parent 54405425e0
commit 4eca56f46a
1 file changed
+4
+4
View File
@@ -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> ...`).