llama.cpp Speculative Decoding Stacking Achieves 6x Speedup
FantasticNature7590 · reddit · 2026-07-17
The author tested various speculative decoding methods on llama.cpp, running comparative combinations on Qwen 3.6 27B: MTP, DFlash, n-gram, and their stacked effects. Key findings:\n\n- For single-turn random prompts, n-gram offers little benefit;\n- In multi-turn scenarios involving iterative code editing, n-gram significantly amplifies DFlash's gains;\n- The best result hit 321.5 vs 53.5 tok/s (approx. 6.01x) during an 18-round coding task, and up to 7.5x during pure code maintenance/editing phases;\n- This setup uses almost no extra VRAM, keeping the lookup table in host RAM.\n\nThe post also details the testing setup: comprehensive benchmarks using LiveCodeBench, MATH-500, various context lengths, alongside the specific hardware and llama.cpp build parameters used.
More from Infra
- Why a 1GW Chinese AI data center may be plausible after all — teortaxesTex · 2026-07-22
- China’s AI arms race is increasingly defined by chips, data centers, and open models — BenBajarin · 2026-07-22
- Agent search bottlenecks are now about variance, not raw latency — rohanpaul_ai · 2026-07-22
- Gavin Baker argues Nvidia may be one of open source AI’s biggest supporters — GavinSBaker · 2026-07-22
- AI Power Demand Exposes US Energy Gap, Urging Shift from Scarcity to Abundance — bradneuberg · 2026-07-22
- Gavin Baker says Nvidia’s $630B figure would be system revenue, not all Nvidia’s — GavinSBaker · 2026-07-22