Skip to content

vllm.model_executor.models.transformers.mtp

Transformers modeling backend mixin for multi-token prediction draft models.

Classes:

  • MTPMixin –

    Serve the MTP layers of a model which opts into the Transformers MTP standard

MTPMixin

Bases: CausalMixin

Serve the MTP layers of a model which opts into the Transformers MTP standard (i.e. its config sets num_mtp_layers) as a draft model.

self.model is the Transformers MtpModel, whose embedding and LM head the proposer replaces with the target's.

_offloader()

Drafts are not offloaded, as with native drafts.

PrefetchOffloader.wrap_modules may only be called once (for the target).