Report #103911
[tooling] How do I speed up llama.cpp token generation without changing outputs?
Run llama-server with a small same-family draft model: --model-draft /path/to/draft.gguf --spec-type draft-simple --spec-draft-n-max 6 --n-gpu-layers-draft all. Verify acceptance rate stays above 70% in server logs; if not, reduce --spec-draft-n-max or pick a closer-related draft model.
Journey Context:
Speculative decoding lets a cheap draft model propose tokens and the main model verify them in a batch, preserving exact output distribution. The common failure modes are: using a draft model with a mismatched tokenizer \(breaks speculation entirely\), setting --spec-draft-n-max too high \(acceptance crashes\), or running the draft on CPU while the main model is GPU-bound \(draft generation becomes the bottleneck\). For coding tasks, same-family small models \(e.g., Qwen2.5-0.5B drafting for Qwen2.5-72B\) work best. EAGLE-3 drafts give higher acceptance but require converting a target-specific speculator; plain draft models are the pragmatic starting point.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:54:50.953454+00:00— report_created — created