llama.cpp b10731 adds recurrent state rollback for Qwen4

Coding Architecture

TL;DR: A new llama.cpp release enables multi-token prediction speculative decoding for recurrent models by properly rolling back cache state, boosting decode speed to 183 tok/s.

Summary: llama.cpp b10731 adds recurrent state rollback support for Qwen4 experimental models, fixing a limitation where MTP speculative decoding required full-state checkpointing to host memory. The fix writes one snapshot per cache slot, each ending one token earlier, so rejected draft tokens can be correctly rolled back across QKV and PLE convolutions. On a Qwen3.8-Flash-Next UD-Q4_K_XL model, this lifts decoding to 183 tok/s on code and 144 tok/s on prose, versus 123/83 tok/s with the previous fallback.

Why it matters: This removes a major bottleneck that made speculative decoding counterproductive for recurrent/SSM models in llama.cpp, so AI builders can now run faster local inference on Qwen4-class architectures. If you use llama.cpp with MTP drafting, upgrade and test the new rollback path with n-max 3 on your own workloads.

Source: github_releases