Skip to content

speculative: MTP ladder passes the ceiling through for a lone sequence only; n=2..4 back to 3 drafts - #273

Merged
AzeezIsh merged 1 commit into
mainfrom
fix/mtp-ladder-lone-passthrough
Oct 30, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/mtp-ladder-lone-passthrough

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Summary

  • Main's default MTP ladder (speculative/ladder.rs) started with (4, usize::MAX). qwen4_exp: serve NVIDIA's Qwen3.8-Flash-Next FP4-Local on its native formats (one GB10) #195 added that rung so qwen4_exp's MTP depth 4..7 reaches the verify at n≤4.
  • On 2×GB10 TP=EP=2, at n=4 that means every sequence drafts all 7 positions. Each verify step gets wider than the extra accepted tokens pay back: C4 aggregate decode is about 11–19% lower than with 3 drafts.
  • This PR keeps the passthrough for a lone sequence and restores 3 drafts for n=2..4, the value pre-qwen4_exp: serve NVIDIA's Qwen3.8-Flash-Next FP4-Local on its native formats (one GB10) #195 and SparkQwen 0.4.0 use: [(1, usize::MAX), (4, 3), (8, 3), (16, 1), (32, 1)]. ATLAS_MTP_K_LADDER still overrides it.
  • With the deep path on (ATLAS_MTP_DYNAMIC_DEPTH=1, ATLAS_MTP_DEEP_MAX_SEQS=2, as in both profiles below), n≤2 doesn't use the ladder's value, so C1/C2 are unaffected.

How it was found (#220)

  • At C4, SparkQwen 0.4.0's engine was 11% ahead of main under the same serving config.
  • Bisect by switch: the gap goes away with ATLAS_MTP_MAX_SEQS=1 and stays with the RDMA path off.
  • With ATLAS_MTP_ACCEPT_DEBUG, 0.4.0 drafts 3–4 positions at C4 where main drafts 7.
  • ATLAS_MTP_K_LADDER='4:3,8:3,16:1,32:1' on main closes it: C4 141–144 vs 0.4.0's 140–144, C1 floor unchanged.

Test plan

Generated with Devin

@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Follow-up check: is anything left past C4? Main plus this PR's ladder (ATLAS_MTP_K_LADDER='1:7,4:3,8:3,16:1,32:1', which equals the new default) against SparkQwen 0.4.0's engine, on 0.4.0's config. sq_bench conc; spark rows are 2 boots per arm, strict is one boot. Receipts are in reiner's ~/code/night1027/out/sqab10/.

main + this ladder 0.4.0 engine
spark C4 140.0 / 140.7 / 144.9 / 145.2 133.2 / 137.9 / 142.9 / 143.9
spark C8 (= max-num-seqs) 208.8 / 208.8 / 209.2 / 210.6 207.8 / 209.1 / 209.9 / 211.9
strict C4 127.8 / 137.5 125.5 / 137.3

With this PR, main matches 0.4.0 at C4 and C8, in both modes.

@AzeezIsh
AzeezIsh merged commit 4724431 into main Oct 30, 2026
25 of 26 checks 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.

1 participant