mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3008] qwen35 (Qwen3.6): --mtp N is silently inert in serve mode unless --batch N --batch-mtp are also passed; setup's own config omits them #1208
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1208
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FlyoverBlind on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3008
Summary
On the qwen35 path (Qwen3.6-35B-A3B),
--mtp Nalone does nothing in serve mode. MTP only activates when--batch N(≥ 2) and--batch-mtpare also passed — and even then only for greedy requests. No warning or error is printed when it is silently inactive. The config that setup.py itself generates for qwen36 sets--mtpbut omits both flags, so the out-of-the-box path runs without MTP and gives no indication.What I measured
Same machine, same model (Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf), Strata v0.1.45, single session, decode speed from the
strata serve:engine log line, steady state:--mtp 4drafts accepted 0 of 0--mtp 4 --batch 2 --batch-mtpdrafts accepted 0 of 0--mtp 4 --batch 2 --batch-mtpdrafts accepted 97 of 106The headline is the log line, not the speed: with
--mtp 4alone the draft model is loaded butdrafts accepted 0 of 0shows it is never used. With the full flag set and a greedy request it engages (~91% acceptance, ~+45% decode vs. baseline on this machine).Where in the code
src/qwen35/q36_engine.cu:E.bmtp = (batch_mtp || (std::getenv("STRATA_BATCH_MTP") ...)) && E.n_sess > 1 && E.mtp_d > 0;if (E.bmtp && E.mtp_d > 0) { ... window_mtp(); return; } window_plain();int mtp_d = 0; // MTP drafts per speculative step (0: none; greedy requests only)So in serve mode
--mtp Nonly setsmtp_d; without--batch ≥ 2→n_sess == 1→bmtp == 0→ every request takeswindow_plain()andmtp_dis never consulted. In generate modemtp_dworks on its own, which makes the serve-mode asymmetry easy to miss.There is a second silent gate worth mentioning: even with the flags right, MTP only runs for greedy requests (
needs_logits()at L3013 — any nonzero temperature or penalty disables it), and server.py'sMODEL_CARD_SAMPLINGdefaults forqwen35moe(temperature 0.7, presence_penalty 1.5, L6779–6786) make ordinary chat requests non-greedy by default. MTP engaged for me only after zeroing penalties and setting temperature 0.Why this looks like a footgun
OWN_PATH_FAMILIES["qwen36"]) setsmtp: 2but does not add--batch/--batch-mtp— the shipped path is MTP-less with no indication.--mtp Nin serve mode andbmtp == 0, nothing says the draft path is loaded but unused.drafts accepted 0 of 0in the log is the only clue.--mtp) and the activation preconditions (--batch,--batch-mtp, greedy, server default penalties) live in three different layers; each one alone silently disables MTP.Suggested fixes (any one would help)
a) Print a startup warning in serve mode when
mtp_d > 0 && !E.bmtp: "MTP requested but inactive: needs --batch N --batch-mtp (and greedy requests)".b) Allow
window_mtp()withn_sess == 1so--mtp Nworks without--batch/--batch-mtp.c) Have setup.py add
--batch-mtp(and a suitable--batch) to the generated qwen36 config whenevermtpis set.Measured on
55983c5astrata serve:log line, single request, steady stateNot tested
STRATA_BATCH_MTPenv route (should behave the same by the code path)n_sess == 1) MTP actually runs correctly if then_sess > 1gate is lifted — I only verified the gate exists, not that the window handles one slot@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
gr_mix_r: no kernel image is availableon engine 0.1.52 (HIP) #1980