Fix Qwen3.6-MoE low MTP acceptance rate#1815
Conversation
1c3d872 to
d237d7b
Compare
|
The fix is also relevant for GLM, at least tried with GLM 5.0 and its now giving a more natural accept rate:
So PR #1513 is becoming closer to non-mtp. |
|
The |
|
Adding my numbers on EPYC 9454P (48c/96t, Zen 4) with 377GB DDR5-4800 in 12-channel config, running CPU-only.
Observations on tuning: The If needed, I can run any additional tests within my capabilities. |
|
Thank you for these results. Can you try |
|
I don't currently have support for If you can point me to the branch or commit with |
|
I'm out and writing from the phone, but it is for sure on the latest main branch. It is -mtprot, not --mtprot (single dash) |
|
You're right, it was a single dash issue.
I've tried various combinations with |
Who needs a GPU? |
|
Some more numbers. Ran two other models with Qwen3-Next-80B-A3B-Instruct
Qwen3.5-122B-A10B
Qwen3.6-35B-A3B
P.S. Had to write a GGUF converter that includes the MTP tensors and port your qwen35moe MTP logic to qwen3next in the engine. The architectures are very similar, so reusing your implementation was mostly straightforward. |
This PR fixes the low acceptance rate reported in #1814.
The first draft token always uses the embeddings computed by the main model. But subsequent draft tokens use the embeddings computed by the MTP layer while generating the previous draft token. The issue was that the embedding prior to RMS norm got used, with the effect that any attempt to use more than one draft token resulted in significant performance drop.
Interestingly enough the same issue exists in the dense Qwen3.6-27B model, but for some reason there it makes no observable difference (difference is still within statistical noise after 10 repetitions of the same prompt).
With this change I finally see a small improvement of MTP performance on CUDA. For Qwen3.6-35B-A3B about 10% (
IQ4_XSquantization) or even 20% (Q8_0quantization) when using--draft-max 2 --draft-p-min 0.Running CPU only, where we had some improvement due to MTP prior to this PR, I now observe a much more significant speedup for Qwen3.6-35B-A3B - about 65% for
--draft-max 4 --draft-p-min 0.5.