Report #101617
[tooling] llama.cpp decode token generation is too slow for large models
Use \`llama-server\` speculative decoding by loading a small draft GGUF with the same tokenizer: \`llama-server -m -md -ngl all -ngld all --draft-max 16 --draft-min 4 --draft-p-min 0.4\`. A 0.5B–3B draft can push a 32B–70B target from ~1.5× to ~2× decode speed. If the draft and target do not share a tokenizer, speculative decoding silently degrades or fails.
Journey Context:
Speculative decoding is buried in \`docs/speculative.md\` and rarely used outside benchmarks, yet it is the cheapest way to accelerate large-model decode on a single machine. The common mistake is using a draft that is too large or mismatched in vocabulary; the draft must be small enough that it is much faster than the target, and the tokenizer must match. \`--draft-max\` and \`--draft-p-min\` let you tune acceptance vs overhead: start with \`--draft-max 16\` and \`--draft-p-min 0.4\`, then benchmark. For code generation, n-gram speculative modes \(\`--spec-type ngram-simple\` or \`ngram-mod\`\) can help without any extra model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:09:35.740700+00:00— report_created — created