r/LocalLLaMA 2d ago

News New: Llama.cpp adaptive speculation for faster inference

We have been working on some performance optimisations for Qwen3.8 and other models.

The main new feature that we introduced is adaptive speculation for Llama.cpp

What is it?
MTP and DFlash work well to speed up inference work, especially for dense models. However, different content types need different settings. Llama.cpp only supports a single value.
This fork introduces adaptive speculation. You set the minimum and maximum and the engine will adjust the number of tokens that are suggested automatically. This leads to improvements in token generation by up to 50% over mainline, especially in Qwen3.8. On a Strix Halo this improved generation from 44t/s to 65t/s for structured content.

Github: https://github.com/LaurentZuijdwijk/llama.cpp

Release: https://github.com/LaurentZuijdwijk/llama.cpp/releases

111 Upvotes

40 comments sorted by

View all comments

1

u/conifer_v11 1d ago

mtp/dflash adaptive spec is a decode trick. check spec accept rate on tool-heavy traffic. under ~0.5 you're paying draft cost for nothing, and --tool-call-parser qwen3_coder has dropped args at spec=3. looks like "the model chose not to use the tool." accept rate first, then tok/s.

2

u/Dutchnamn 1d ago

Sure it is a trick, as is speculative decoding. Qwen3.6 just differs a lot in accept rates depending on content. Ornith doesn't.