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

decode: size --lookup-chain's window cap from the cap in force, not the stale mtp_max_t

Zackea08bd6e813b
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index ba00f94d7..0b5e3c400 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -2568,10 +2568,13 @@ int main(int argc, char** argv) {
o.mtp_max_t = o.spec;
o.spec = std::min(o.spec + 2, 8); // kVerifyMaxT
}
- // --lookup-chain (opt-in): the MTP keeps its windows; a lookup chained after its drafts may lengthen one by up to K
+ // --lookup-chain (opt-in): the MTP keeps its windows; a lookup chained after its drafts may lengthen one by up to K.
+ // Sized from the cap actually in force: the suffix block above may already have raised --spec to --spec+2, so sizing
+ // from mtp_max_t left K=1 and K=2 with a window identical to not passing the flag at all.
if (o.lookup_chain > 0 && o.spec >= 2) {
if (o.mtp_max_t == 0) o.mtp_max_t = o.spec;
- o.spec = std::max(o.spec, std::min(o.mtp_max_t + o.lookup_chain, 8)); // kVerifyMaxT
+ const int chain_base = o.spec;
+ o.spec = std::max(chain_base, std::min(std::max(chain_base, o.mtp_max_t) + o.lookup_chain, 8)); // kVerifyMaxT
}
strata::core::layer_set_shared_early(!o.shared_late);
if (!o.native_preset.empty()) {