Skip to content

fix: improve Qwen3.5 MTP accept rate - #1402

Merged
shihaobai merged 1 commit into
ModelTC:mainfrom
sufubao:fix-qwen35-mtp-accept-rate
Jul 24, 2026
Merged

fix: improve Qwen3.5 MTP accept rate#1402
shihaobai merged 1 commit into
ModelTC:mainfrom
sufubao:fix-qwen35-mtp-accept-rate

Conversation

@sufubao

@sufubao sufubao commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Qwen3.5 MTP draft 需要使用 final norm 后的 hidden,当前实现直接传入 raw hidden,导致接受长度偏低。

本 PR 像共享 embedding/lm_head 一样把 main final norm 共享给 draft,并在 draft 输入融合前执行 norm;改动仅限 qwen3_5_mtp

验证:H200、Qwen3.5-0.8B、TP=1、eagle_with_attmtp_step=3,8 个固定请求各生成 256 tokens;按相同口径汇总的 accept length 从 1.804 提升到 2.738(+51.7%),输出与 producer-side post-norm 版本逐项一致。相关 MTP CUDA 单测 2/2 通过,Black、Flake8 和 py_compile 通过。

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@sufubao
sufubao force-pushed the fix-qwen35-mtp-accept-rate branch from d315b20 to af19707 Compare July 24, 2026 08:08
@sufubao
sufubao force-pushed the fix-qwen35-mtp-accept-rate branch from af19707 to e27ef4e Compare July 24, 2026 10:13
@shihaobai
shihaobai merged commit 20ad042 into ModelTC:main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants