vllm.model_executor.models.nemotron_h_mtp
¶
NemotronH-MTP model with attention layers.
Classes:
-
NemotronHMTP–NemotronH MTP model.
-
NemotronHMultiTokenPredictor–MTP predictor with NemotronH layers.
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–Compute logits for DRAFT token generation.
-
forward–Forward - applies attention-based MTP.
-
is_unused_checkpoint_weight–Only MTP weights are loaded: the embedding and LM head are the
-
load_weights–Load MTP weights with proper name remapping.
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.