docs(local-llm): add speculative decoding and MTP page - #250
docs(local-llm): add speculative decoding and MTP page#250JacobPEvans-personal wants to merge 1 commit into
Conversation
Multi-token prediction was undocumented on the site despite the serving stack carrying a full option surface for it. New page covers why single-stream decode is bandwidth-bound and the only two levers that follow, what a trained MTP head changes versus a separate drafter, and the drafter/target quantization independence — a 6-bit drafter serves 4-bit weights, so adopting it does not mean re-downloading a model. Notes that over-quantizing a draft head costs acceptance rather than answer quality, which makes the lost speedup invisible from output alone. Two corrections to common misreadings: - Concurrency is a coupling, not a cap. Worker batch width and the proxy admission gate must be EQUAL, both accept 1-4, and nothing pins MTP to 1. The default of 1 is what makes it look otherwise. - A ratio of two runs cannot identify a setting. Adds a section to "Verifying the instrument": the same model serving byte-identical output measured 17.4-27.3 tok/s here, a spread that swallows the effect being attributed, which is why the catalog entry records no tok/s figure at all. Also flags MTP as an axis distinct from bit depth in models-and-quantization, and adds the nav entry and cross-links. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01958YZZy8AwpswXE2E5K5XG
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a6152e84-8896-4ab4-8f94-6c64864a0c61) |
There was a problem hiding this comment.
Code Review
This pull request introduces a new documentation page on speculative decoding and multi-token prediction (MTP), detailing its performance characteristics, configuration, and evaluation. It also updates existing documentation to link to this new page and adds a section warning against benchmarking pitfalls. The review feedback correctly identifies potential typos in the model names and Hugging Face repository identifiers (e.g., 'Qwen 3.8' and 'Qwen3.8-27B') that should be verified and corrected.
What
Multi-token prediction was undocumented on the site, despite the Nix serving stack carrying a full option surface for it.
Adds
local-llm/speculative-decoding.mdxplus a nav entry, and extends two existing pages.The new page
Two corrections to common misreadings
Concurrency is a coupling, not a cap. Worker batch width and the proxy admission gate must be equal; both accept 1–4; nothing pins MTP to 1. The default of 1 is precisely what makes it look otherwise, so the page says so explicitly in a
<Warning>.A ratio of two runs cannot identify a setting. New section in
verifying-the-instrument, which is already the page about procedures that produce answers of the right shape rather than correct ones. The concrete number: the same model serving byte-identical output measured 17.4–27.3 tok/s across runs here — a spread that swallows the effect being attributed. This is why the catalog entry for that model records no tok/s figure at all. Also covers the quiet one: most serving options are read at startup only, so an edited config without a restart benchmarks the old setting and returns a clean null result that looks like evidence.Also
models-and-quantizationgains a short subsection framing MTP as an axis distinct from bit depth, since the two combine freely and the page otherwise implies quantization is the only dimension.Content boundaries
No internal hostnames, IPs, credentials, or references to private repos. Model IDs cited are public Hugging Face repos. Hardware measurements are described as "this estate" without identifying infrastructure.
Verification
nix develop mint dev # visual check, incl. the <Steps> and <Warning> blocks mint broken-linksdocs.jsonwas validated as parseable JSON, and all four internal link targets in the new page were confirmed to exist as files. Longest prose line is well under the 160-charMD013limit.Provenance
Triage of a Reddit thread about running Qwen3.8-27B faster. Most of its advice was already implemented in the estate — often with better data — but the gaps it exposed were worth writing down. The companion code fix is dryvist/nix-ai#1835, which found that the MTP option surface was unreachable.
Generated by Claude Code
Note
Low Risk
Documentation-only changes with no runtime, auth, or data-path impact.
Overview
Documents multi-token prediction (MTP) and speculative decoding for the local LLM / Nix serving stack, which previously had options but no site coverage.
Adds
local-llm/speculative-decoding.mdx(nav entry indocs.json): bandwidth-bound decode, MTP vs a separate drafter, independent drafter/target quants (including the “over-quant the draft → silent loss of speedup” trap), draft-depth tuning, and thatmaxNumSeqsand proxy concurrency must match (1–4), not that MTP is stuck at 1. Includes a short evaluation workflow and warns against inferring settings from a two-run throughput ratio.models-and-quantizationgets a subsection framing MTP as an axis separate from bit depth.verifying-the-instrumentadds the same ratio fallacy (report spreads, read config/CMD line, restart between arms) and a related card linking to the new page.Reviewed by Cursor Bugbot for commit b3b4e39. Bugbot is set up for automated code reviews on this repo. Configure here.