Skip to content

vllm.model_executor.models.nemotron_h_mtp

NemotronH-MTP model with attention layers.

Classes:

NemotronHMTP

Bases: Module, SupportsPP, SupportsQuant, SupportsMultiModalEmbeddings

NemotronH MTP model.

The draft block is trained on the target decoder's input stream. On a multimodal checkpoint the placeholder positions therefore carry the target's image or audio embeddings, not the text embedding of the placeholder token.

Methods:

compute_logits(hidden_states)

Compute logits for DRAFT token generation.

forward(input_ids, positions, hidden_states=None, intermediate_tensors=None, inputs_embeds=None, **kwargs)

Forward - applies attention-based MTP.

is_unused_checkpoint_weight(name)

Only MTP weights are loaded: the embedding and LM head are the target's, shared after loading, so a target refit also updates the drafter.

load_weights(weights)

Load MTP weights with proper name remapping.

NemotronHMultiTokenPredictor

Bases: Module

MTP predictor with NemotronH layers.