nemo_automodel.components.models.d1.text_readout
nemo_automodel.components.models.d1.text_readout
Model-owned frozen text features and released D1 option-scoring semantics.
Module Contents
Classes
Functions
API
Final-token features and max-over-answer-alias logits for D1-3B.
Return the causal final-token state before the tied vocabulary projection.
Parameters:
Long Tensor of shape [1, sequence] on the model device.
Boolean Tensor of shape [1, sequence], all true.
Returns: torch.Tensor
Tensor of shape [hidden] containing the final normalized token state.
Apply answer-alias maxima without introducing a new temperature.
Parameters:
Tensors of shape [hidden] on the head device.
Causal questions whose alias vocabulary IDs were prepared by this readout, in feature order.
The additive answer-row adapter or a frozen reference copy.
Returns: list[torch.Tensor]
List of float32 Tensors of shape [options], in each example’s option order.
Sequence features and calibrated marker logits for D1 Omni text.
Return normalized text states before the released marker head.
Parameters:
Long Tensor of shape [1, sequence] on the model device.
Boolean Tensor of shape [1, sequence], all true.
Returns: torch.Tensor
Tensor of shape [sequence, hidden], retaining its backbone graph
Pad text features, score marker rows, and apply released calibration.
Parameters:
Tensors of shape [sequence, hidden] on the head device; sequence lengths may differ. Readout arithmetic uses float32.
Marker questions with released text temperatures, aligned with features and retaining internal false/true noul order.
The released Omni marker head or a frozen reference copy.
Returns: list[torch.Tensor]
List of float32 Tensors of shape [options], in each example’s option order,
One variant’s feature boundary and trainable released readout.
head is the only trainable module in this frozen-feature workflow.
A feature must be scored by the readout that produced it: causal features
have shape [hidden], while Omni features have shape [sequence, hidden].
Return the trainable released head or additive answer-row adapter.
Encode one unpadded text question without applying the readout.
Parameters:
Long Tensor of shape [1, sequence] on the model device.
Boolean Tensor of shape [1, sequence], all true.
Returns: torch.Tensor
Tensor of shape [hidden] for a causal final-token feature, or
Score aligned features using the variant’s option and calibration rules.
Parameters:
Tensors of shape [hidden] for the causal variant, or [sequence, hidden] for Omni, on the head device, one per example.
Publisher-encoded questions in the same order as features.
This variant’s trainable readout, or a frozen reference copy.
Returns: list[torch.Tensor]
List of float32 Tensors of shape [options], one per example in its
Reject missing feature slots before variant-specific scoring.
Parameters:
Tensors of shape [hidden] or [sequence, hidden], one per example.
Publisher-encoded questions in feature order.
Require the single-question, unpadded frozen-feature boundary.
Parameters:
Long Tensor of shape [1, sequence] with nonempty sequence.
Boolean Tensor of shape [1, sequence], all true, on the same device as input_ids.