llama.cpp Adds MTP and DSpark Support for DeepSeek V4 Flash
The popular open-source inference engine llama.cpp has introduced support for Multi-Token Prediction (MTP) and DeepSeek's DSpark framework. This integration specifically optimizes local inference performance for the DeepSeek V4 Flash model. This update enables significantly faster local inference for state-of-the-art open models like DeepSeek V4 Flash without sacrificing output quality. By leveraging DSpark's speculative decoding, users can achieve up to 85% faster inference speeds. DeepSeek V4 Flash is a Mixture-of-Experts (MoE) model with 284 billion total parameters, of which 13 billion are active per token. DSpark achieves its speedups through speculative decoding, ensuring byte-identical outputs without requiring model retraining.
## BACKGROUND
Traditional large language models predict text one token at a time, which can be computationally slow. Multi-Token Prediction (MTP) allows models to predict multiple future tokens simultaneously, while speculative decoding frameworks like DSpark use smaller draft models to guess future tokens and speed up the generation process.