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
- Anthropic's S-1 Reveals Over $600B in Infrastructure Commitments Across Google, Amazon, Microsoft — cedric_chee · 2026-10-26
- Anthropic S-1 reveals 48 cents of compute cost per dollar of Q2 revenue — nmasc_ · 2026-10-26
- Persistent AI joins UR network to route private AI inference with encrypted, IP-hidden traffic — 0xSammy · 2026-10-26
- Anthropic's disclosed compute commitments: $114.5B Google, $161.2B Broadcom top the list — BenBajarin · 2026-10-26
- SpaceX strikes $40B deal with Apollo Global to lease AI chips and data center hardware — Polymarket · 2026-10-26
- SpaceX AI revenue up 830%, Claude designs 318K antivenom proteins in 64 hours — PeterDiamandis · 2026-10-26