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
- SF Compute founder: buying compute is 'an absolutely awful experience' right now — IgorCarron · 2026-09-11
- SmolVM open-sources persistent computer infrastructure for agents that outlive chat sessions — aniketmaurya · 2026-09-11
- PyTorch Day Korea 2026 launches first offline conf, CFP closes Sept 13 — PyTorch · 2026-09-11
- Local LLM server dilemma: 4x CMP-170HX (price up 53% in 20 days) vs Mac Studio M5 Ultra — rumboll · 2026-09-11
- llama.cpp lands Flash Attention tuning for RDNA4, big prefill gains on AMD — pmttyji · 2026-09-11
- Your p99 latency benchmark may be lying: a deep dive into coordinated omission — Franc0Fernand0 · 2026-09-11