Why MTP doesn't speed up your llama.cpp inference (and how to actually fix it)
The article discusses the limitations of multi-token prediction (MTP) in llama.cpp and why it may not lead to expected performance improvements. It identifies three main issues that can hinder MTP's effectiveness, including low acceptance rates, KV cache thrashing, and CUDA graph capture failures. The author provides a step-by-step diagnostic approach for users experiencing performance issues with MTP.
- ▪Multi-token prediction (MTP) is designed to improve inference speed by generating multiple candidate tokens per forward pass.
- ▪MTP can fail to provide speed improvements if the acceptance rate is low, if there is excessive memory usage, or if CUDA graph capture fails.
- ▪The author suggests measuring acceptance rates and monitoring VRAM usage as initial steps in diagnosing MTP performance issues.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3834047) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Alan West Posted on May 18 Why MTP doesn't speed up your llama.cpp inference (and how to actually fix it) #llm #performance #machinelearning #gpu Last week, I spent two days banging my head against a wall. I had just spun up a fresh llama.cpp build with multi-token prediction (MTP) support, loaded a quantized Qwen3 model, and ran my benchmark suite expecting that sweet 2-3x speedup everyone keeps talking about. The result? Roughly the same tokens per second. Sometimes slower.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).