Tutorial
llama.cpp MTP Fix – making Multi-Token Prediction reliable
A patch for llama.cpp that gives the server prompt cache the MTP carrier it was missing: checkpoint restore works again, cache reuse stops failing silently, and a broken restore no longer ends the server with GGML_ABORT.
If you run llama.cpp with Multi-Token Prediction (MTP) and the server prompt cache, you run into a bug that only shows up in real use: a branch from a stored checkpoint re-prefills silently from scratch – or the server ends with GGML_ABORT.
The cause is small but fatal: when a checkpoint is stored, llama.cpp saves the KV states of the target and draft model, but not the MTP carrier – the hidden row coupled to the KV boundary. This article describes the bug, the fix across five files, and the verification: from the HTTP test with Qwen3.8-27B, through the C++ unit test, to the mutant test.
Read more: llama.cpp MTP Fix – making Multi-Token Prediction reliable