Expand description
Multi-Token Prediction (MTP / NextN) support.
ik_llama.cpp’s MTP is an embedded mechanism: a single model carrying
NextN prediction layers (loaded with crate::LlamaModelParams::with_mtp),
driven by a low-level op-type state machine plus a common_speculative driver.
MtpOpType+crate::LlamaContext::set_mtp_op_typeexpose the raw op-type primitive (available withoutcommon).MtpSpeculative(requires thecommonfeature) is the full draft/accept driver, backed by a C++ glue over ik’scommon_speculative_*(ik_llama_rs_mtp_*). It reproduces the native--spec-type mtpflow.
Structs§
- MtpSpeculative
- Full MTP speculative driver (requires the
commonfeature). - MtpSpeculative
Params - Parameters for MTP speculative decoding. Mirrors the shape of llama-cpp-2’s
MtpSpeculativeParams(plustemp/mtp_headsfor ik’s driver). - MtpStep
- Result of one
MtpSpeculative::step.
Enums§
- MtpOp
Type - MTP decode-graph operation mode (maps to ik’s
llama_mtp_op_type).