nemo_automodel.components.models.nemotron_decision.scorer
nemo_automodel.components.models.nemotron_decision.scorer
Scoring and checkpoint-contract checks for Nemotron Decision post-training.
Module Contents
Functions
Data
API
Whether backbone fine-tuning trains this parameter: decoder layers and final norm, not embeddings or the head.
Activation-checkpoint and torch.compile wrapper segments in the name are ignored.
Rows of the frozen, bias-free decision head for token_ids.
All ranks must call this when the head weight is a sharded DTensor.
Parameters:
Model exposing the decision head through get_output_embeddings().
Vocabulary ids of the rows to gather, length T.
Returns: torch.Tensor
Tensor of shape [T, hidden] in the head’s dtype (a copy).
Option logits of one question: one bidirectional read of prompt + [mask], head restricted to the codes.
Equivalent to diffusion_head(hidden[:, -1])[code_token_ids]; the frozen head rows are used directly so the
head never has to run under a sharded wrapper.
Parameters:
Backbone returning the last hidden state for input_ids (output_last_hidden_states_only=True).
Prompt token ids, length L (no mask).
Single-token code of each option, length N.
Mask token appended as the answer slot.
Frozen head rows by vocabulary id, each of shape [hidden].
Device of the token ids.
Returns: torch.Tensor
fp32 tensor of shape [N].
Reject checkpoints whose runtime contract this recipe does not implement.
The recipe trains Nemotron 3.5 Decision checkpoints: a text Ministral 3 encoder read with fully bidirectional attention, one question per read, and the decision head at the mask token. Vision and quantized variants need their own input and storage paths and are not run silently as the text model.
Parameters:
Hugging Face config (attribute access) of the checkpoint.
Raises:
ValueError: If the architecture, attention or storage format is unsupported.