docs: tuning guidance for draft-mtp speculative decoding#24508
docs: tuning guidance for draft-mtp speculative decoding#24508MerkyorLynn wants to merge 1 commit into
Conversation
|
Hi @MerkyorLynn, thanks for your contribution! Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:
Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below. |
Thanks. I closed #24273, so this is now my only open PR. I also rewrote the PR description and commit message to make the benchmark setup, local results, and AI assistance disclosure explicit. |
Document local benchmark results showing that draft depth and --draft-p-min can matter for MTP self-speculation acceptance.
920207a to
70f6760
Compare
|
This is not a good advice - the StepFun MTP currently works only with draft length of 1 (#23274), so that's the main reason for your observations. |
Summary
Docs-only change. This adds a short tuning note for
--spec-type draft-mtpindocs/speculative.md.The point is to document that the default
--spec-draft-n-max 3 --draft-p-min 0is not always a good setting for MTP self-speculation, because deeper low-confidence drafts can be generated and then rejected by the target model.Local benchmark
I measured this locally on my GB10/Spark system with llama.cpp commit
88a3927.Setup:
step35, Q3_K_M)-np 1 -c 512 -ub 64--spec-draft-n-max 3 --draft-p-min 0--spec-draft-n-max 2 --draft-p-min 0--spec-draft-n-max 2 --draft-p-min 0.6--spec-draft-n-max 2 --draft-p-min 0.85On this setup,
--spec-draft-n-max 2 --draft-p-min 0.6changed the result from slower-than-baseline to a speedup with high draft acceptance.Note
My understanding is that with MTP self-speculation, a single MTP head is chained autoregressively. In this case, deeper drafts can become low-confidence and often fail target verification. The doc change points users at the two knobs that mattered in my test: draft depth and the confidence gate.
AI disclosure: I used Claude Code/Codex only as an assistant for small helper-script checks and note organization. I ran the benchmark myself on my GB10/Spark machine, and I reviewed the numbers, mechanism, and doc change before submitting.
cc @stepfun-ai (
step35MTP).