Report #84341
[tooling] Speculative decoding requires loading a second draft model, causing OOM on limited VRAM
Use n-gram lookup-based speculative decoding: launch llama-server with --draft 16 --lookup-ngram-min 1 --lookup-ngram-max 3. This drafts tokens by matching n-grams in the current context window against the prompt/cache, requiring zero additional model memory and achieving 1.5-2.5x speedup on structured data.
Journey Context:
Standard speculative decoding loads a small draft model \(7B\) alongside the main model \(70B\), doubling memory footprint and complicating deployment. N-gram speculation exploits local temporal patterns in text \(repetitive code blocks, JSON structures\) by searching the last N tokens for matches in the prefix, then proposing subsequent tokens as draft candidates. It requires zero VRAM overhead and excels on structured generation, though it provides less benefit on entropic creative writing. This is the only viable speculative approach for 70B models on 24GB cards.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:09:39.962080+00:00— report_created — created