speculators.convert.mtp.converter
MTP checkpoint converter.
Extracts only the MTP layer weights from a checkpoint with native MTP layers and saves a Speculators checkpoint that loads with MTPDraftModel.from_pretrained(path).
Only the mtp.* subtree is extracted from the (potentially sharded) safetensors file; the rest of the model is never loaded. The embed_tokens and lm_head are loaded from the verifier at runtime via load_verifier_weights().
Classes:
-
MTPConverter–Extract the MTP head from a checkpoint with native MTP layers.
MTPConverter
Extract the MTP head from a checkpoint with native MTP layers.
Reads only the MTP layer, embed_tokens, and lm_head from the source checkpoint. Sharded safetensors files are handled transparently via the weight index -- the main transformer stack is never loaded.