nemo_automodel.components.models.d1.model
nemo_automodel.components.models.d1.model
Checkpoint-compatible Omni model with a differentiable decision API.
Module Contents
Classes
API
Bases: HFCheckpointingMixin, PreTrainedModel
Omni’s bidirectional trunk and released marker head, preserving all weights.
Perception classes come from reviewed, immutable released code. The language encoder and decision API are model-owned. Training returns tensors with their autograd graph intact, unlike the released inference probability interface.
Encode a mono 16 kHz clip into a perception prefix.
Parameters:
Float Tensor or array of shape [samples], containing a mono waveform sampled at 16 kHz, as accepted by the pinned perception module.
Returns: torch.Tensor
Tensor of shape [1, prefix_sequence, hidden].
Encode ordered PIL images into a perception prefix.
Returns: torch.Tensor
Tensor of shape [1, prefix_sequence, hidden], concatenating all images.
Encode text with optional precomputed perception prefixes.
Parameters:
Long Tensor of shape [batch, sequence], with right padding.
Boolean Tensor of shape [batch, sequence], true for text tokens.
Optional Tensor of shape [batch, padded_prefix_sequence, hidden].
Optional long Tensor of shape [batch] specifying real prefix lengths.
Returns: torch.Tensor
Pair of normalized text-state Tensor of shape
Return differentiable option logits in the released internal ordering.
Parameters:
Long Tensor of shape [batch, sequence], with right padding.
Boolean Tensor of shape [batch, sequence], true for text tokens.
Long Tensor of shape [batch, options], relative to text.
Boolean Tensor of shape [batch, options] marking declared options.
Long Tensor of shape [batch], choice=0, score=1, noul=2.
Optional Tensor of shape [batch, padded_prefix_sequence, hidden].
Optional long Tensor of shape [batch] giving real prefix lengths.
Optional long Tensor of shape [batch] of internal option indices.
Returns: SequenceClassifierOutput
SequenceClassifierOutput containing float32 logits Tensor of shape
Return the text input embedding table.
Prepare the released marker readout for text-only adaptation.
Parameters:
Publisher-encoded questions; marker identity and calibration remain attached to each example and are consumed when scoring.
Returns: D1OmniTextReadout
Sequence feature extractor and the released float32 marker head.
Replace the text embedding table.