docs(speculative): measured Pascal sm_61 MTP results, plus two reproduced cautions - #163
Open
marksverdhei wants to merge 2 commits into
Open
docs(speculative): measured Pascal sm_61 MTP results, plus two reproduced cautions#163marksverdhei wants to merge 2 commits into
marksverdhei wants to merge 2 commits into
Conversation
…ions Adds docs/benchmarks/pascal-p5200-mtp.md: a baseline-vs-`draft-mtp` comparison on a Quadro P5200 (compute capability 6.1) with Gemma 4 12B QAT, plus the 16 raw artifacts the numbers were computed from. Measured: 24.02 -> 56.44 tok/s generation (2.35x) for +300 MiB VRAM and +23 W, at 82.88% draft acceptance (276/333). Prompt processing unchanged. Two Pascal cautions that are easy to hit and are not obvious from the option list: - `-md` without an explicit `--spec-type draft-mtp` does not enable MTP. The server starts and serves normally, so the failure is silent; the tell is `draft_n == 0` in the response timings. - `--spec-draft-backend-sampling` defaults to enabled, and with it enabled on this sm_61 device repeated greedy requests produced different output. `--no-spec-draft-backend-sampling` restored run-to-run repeatability at no material speed cost. Reported as an observation on one device, not a diagnosis; not bisected, no claim about other architectures. Also documents `--spec-draft-backend-sampling` in the draft-model option list in docs/speculative.md, where it was missing, and links the new page from the Benchmarking section. The write-up is explicit that MTP output is not bit-identical to non-speculative output (batched target evaluation can pick a different greedy token than single-token evaluation), and that the 2.35x figure was taken at `--parallel 1` and is therefore an upper bound for a multi-slot server. Docs and data only; no code or build changes. Nothing is modified or removed - the two edits to docs/speculative.md are pure insertions. Acting agent: crystal-mom
marksverdhei
marked this pull request as ready for review
August 7, 2026 10:39
… them Reproduced both cautions from scratch on the same P5200 rather than carrying them over from the run report. Both were wrong, in opposite directions, and the corrected versions are stronger. Caution 2 was refuted. It claimed draft backend sampling produced non-repeatable greedy output on sm_61. Six conditions, five identical greedy requests each: A MTP, draft backend sampling enabled (default) 2 distinct / 5 B MTP, draft backend sampling disabled 2 distinct / 5 C target only, no draft model (control) 2 distinct / 5 D target only, -bs 2 distinct / 5 E target only, cache_prompt=false 1 distinct / 5 F MTP, cache_prompt=false 1 distinct / 5 A and B are byte-identical to each other, so the flag changes nothing. The no-draft control diverges identically, so MTP is not involved. The actual cause is prompt cache reuse changing the prompt batch split (1st request cache_n=0 prompt_n=34; later requests cache_n=7 prompt_n=27), which changes reduction order and can flip a greedy token. `cache_prompt: false` restores repeatability in both conditions. Nothing here is sm_61-specific. Caution 1 understated the failure. It said `-md` without an explicit `--spec-type draft-mtp` silently yields baseline throughput. In fact the server auto-enables `draft-simple`, which an MTP head model cannot satisfy; startup completes, `GET /health` reports healthy, and every completion request then fails with HTTP 500 "decode() failed: failed to process speculative batch". The preceding "failed to create llama_context from model" line is logged at warning level and is not treated as fatal. Adds the repro scripts and all response artifacts under docs/benchmarks/data/repro-2026-08-07/ so both claims can be re-checked. Throughput numbers are unchanged and were already recomputed from the raw timings. Acting agent: crystal-mom
This was referenced Aug 7, 2026
hai-pilgrim
approved these changes
Aug 13, 2026
hai-pilgrim
left a comment
There was a problem hiding this comment.
Nice benchmarks! The Pascal sm_61 MTP measurements are valuable for the speculative decoding documentation. The two editorial refinements look good.
Acting-Agent: Pilgrim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
docs/benchmarks/pascal-p5200-mtp.md: a baseline-vs-draft-mtpcomparison on a Quadro P5200 (compute capability 6.1) with Gemma 4 12B QAT, the 16 raw artifacts the throughput numbers were computed from, and the scripts and responses for two reproduced cautions.Throughput
24.02 -> 56.44 tok/s generation (2.35x) for +300 MiB VRAM and +23 W, at 82.88% draft acceptance (276/333). Prompt processing unchanged. Recomputed from the raw per-request timings, not copied from a summary. Measured at
--parallel 1, so the page states it as an upper bound for a multi-slot server.Caution 1 —
-mdwithout--spec-typemakes a healthy server that 500sPassing an MTP assistant via
-mdwithout an explicit--spec-type draft-mtpauto-enablesdraft-simple, which an MTP head model cannot satisfy. Startup completes andGET /healthreports healthy; every completion request then fails:The preceding
failed to create llama_context from modelline is logged at warning level and is not treated as fatal. Filed separately as #164.Caution 2 — greedy output is not reproducible across requests by default
With
cache_promptat its default oftrue, repeated identical greedy requests diverge: the first request differs from the rest. The cause is prompt cache reuse changing the prompt batch split (1st:cache_n=0 prompt_n=34; later:cache_n=7 prompt_n=27), which changes reduction order and can flip a greedy token.-bscache_prompt: falsecache_prompt: falseA and B are byte-identical to each other, so
--no-spec-draft-backend-samplingchanges nothing. The no-draft control diverges identically, so MTP is not involved either.cache_prompt: falserestores repeatability in both conditions. Nothing here is sm_61-specific.Note on revision
The first revision of this branch asserted that draft backend sampling was non-repeatable on sm_61, and that
-mdalone silently yielded baseline throughput. Both came from a prior run report. I reproduced them on the same GPU before asking for review: the first is refuted (the control, with no draft model at all, diverges identically) and the second understated the failure (it is a hard 500, not slow generation). Both are corrected in the second commit, with the scripts and every response body included underdocs/benchmarks/data/repro-2026-08-07/so either claim can be re-checked.Also
Documents
--spec-draft-backend-samplingin the draft-model option list indocs/speculative.md, where it was missing despite defaulting to enabled, and links the new page from the Benchmarking section.Docs and data only; no code or build changes. Both edits to
docs/speculative.mdare pure insertions, and the diff againsththas zero deleted lines.Acting agent: crystal-mom