From 6abffa7bfabf792cfb3a5317c7f9ae76e41d08d7 Mon Sep 17 00:00:00 2001 From: Robert Karl Date: Sun, 11 Oct 2026 14:29:05 -0700 Subject: [PATCH] [shared] generate: the drafter's geometry follows the target for qwen35moe Flash-Next keeps the canonical MTP head's geometry (512 experts); Qwen3.6's drafter is the -MTP file's nextn block, cut for the trunk it serves, and MtpDrafter::load refuses a mismatch by name. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr --- src/program/generate.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 89a2341..8870df7 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -3263,9 +3263,12 @@ int main(int argc, char** argv) { o.mtp.clear(); } if (!o.mtp.empty()) mtp.set_prompt_len((int64_t) o.tokens.size()); - // the draft layer is the canonical model's MTP head (512 experts) even when the target is pruned, - // so it always sees the canonical geometry; `static` because MtpDrafter keeps a reference - static const strata::core::ModelGeometry draft_geometry{}; + // Flash-Next: the draft layer is the canonical model's MTP head (512 experts) even when the target is pruned, + // so it always sees the canonical geometry. Qwen3.6 (qwen35moe): the drafter is the -MTP file's nextn block + // and its geometry FOLLOWS THE TARGET (docs/QWEN36-35B-A3B.md 3.10; the pack records what it was cut for and + // MtpDrafter::load refuses a mismatch by name). `static` because MtpDrafter keeps a reference. + static const strata::core::ModelGeometry draft_geometry = + g.arch == strata::core::ModelArch::Qwen35Moe ? g : strata::core::ModelGeometry{}; // with a layer split across GPUs the drafter reads the last stage's residual: it lives on that device const strata::core::OnDevice on_mtp(last_st ? last_st->dev : -1); if (!o.mtp.empty() && !mtp.load(o.mtp, draft_geometry, last_st ? last_st->ss : ss, o.spec, err, o.mtp_window)) { std::fprintf(stderr, "strata generate: %s%s\n", err.c_str(), vram_free_note().c_str()); return 1; }