mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3728] [Engine] Per-pack MTP draft head (or q8/q4 MTP expert runtime) for non-Q2_0 packs #1560
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#1560
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 @dduckpal on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3728
Area
[Engine] (speed, kernels, models, the server and API)
What do you want to do?
Support an MTP draft head that matches the main pack's quantization instead of forcing every install through the single shared
mtp-q2_0.ggufhead — either:mtp-iq3_xxs.gguf, selected by setup/the engine to match the installed pack, ormtp_pack.py --experts q8_0(orq4_0) can actually load and run.Who needs it: anyone running a non-Q2_0 pack (i-quants such as IQ3_XXS) with MTP speculative decoding on. The draft head's experts are always Q2_0 while the verifier model is not, and measured draft acceptance on long-context decode is modest (numbers below).
What do you do today instead?
Use the shared
mtp-q2_0.ggufhead for every pack.setup.pyhardcodes it in both the streaming path (mtp/mtp-q2_0.gguf,--experts q2_0) and the standard path (mtp_pack.py --experts q2_0+mtp_rt.py), so there is no way to get a matching head through setup.mtp_pack.pyalready can emit--experts q4_0/q8_0packs ("acceptance comparison arm"), buttools/mtp_rt.py:blob_of()assumes the Q2_0 block layout (reshape(..., H // 64, 18), 18 bytes per 64-value block) with no format check — feeding it a q4_0/q8_0 pack would silently mis-relayout the experts rather than erroring (unconfirmed static analysis; I did not run it). Related history: #2504 (Metal + Q4_0 MTP experts stopped at the first request, missingmoe_gukernel) and #1867 (Q4 draft-head size mismatch on an IQ2_XS pack) — both closed, neither delivers a supported non-Q2_0 MTP path today.Measured evidence (PR #3611 artifacts, computed from the committed files)
Environment: Mac Studio M5 Ultra 96 GB, macOS 27.2, engine 0.1.47-metal (source build at
011c9e6), Qwen3.8-Flash-Next IQ3_XXS, 262144-token context, MTP on (--spec 2vs--spec 3runs,strata-qwen38-thinking-v1-draft.1).draft_n/draft_n_acceptedin the committedoutputs.jsonl: spec2 run 2659/3609 = 73.7% overall (73.6% excl. warmup); spec3 run 3213/5291 = 60.7%. By request class: short 81.5% / 72.1%, 4K+16K perf prompts 67.8% / 52.5% (spec2 / spec3).So on the long-context decode this workload actually cares about, roughly a third to a half of drafted tokens are rejected while the draft head (Q2_0 experts) disagrees in format with the verifier (IQ3_XXS). Reporter's estimate (not measured): +10 pp acceptance would put XXS decode near ~130 tok/s. The format mismatch is my hypothesis for the gap, not a proven cause — the request is to make the matching-head experiment possible so it can be tested.
Reproduction status: figures above recomputed locally from #3611's committed
results.json/outputs.jsonl(open PR); no engine changes made.@github-actions[bot] commented on GitHub (Oct 22, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 24, 2026):
Thanks, this follows the format now.
@ruaibot42 commented on GitHub (Oct 26, 2026):
+1 for option (B), with a second use case: people who run only >= 4-bit files on purpose.
We run Unsloth UD-Q6_K_XL on a Radeon AI PRO R9700 (Linux, HIP) with every expert in RAM, and we keep a hard rule of
nothing below 4-bit anywhere in the stack, draft layers included. Today that means we run with no draft layer at all,
because the runtime drafter only takes the Q2_0 experts.bin (mtp.cpp sizes it as n_expert x kernels::cpu::BLOB, and
BLOB is the Q2_0 layout from kernels/cpu/expert.hpp; mtp_rt.py's blob_of() also assumes 18-byte/64-weight blocks).
mtp_pack.py --experts q8_0already writes a ~2.67 GB head, so the missing piece is the runtime side.It also matters for two cards: per MULTI_GPU.md, pipeline windows (the RDNA4 default on a split, +21% decode on
2 R9700s in your table) need the draft layer, so without a >= 4-bit head a split loses that too.
Happy to run an acceptance A/B (Q2_0 vs Q8_0 head against a UD-Q6 verifier) on 1 and 2 R9700s if a branch appears.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. 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.