nemo_automodel.components.models.mimo_v25.model
nemo_automodel.components.models.mimo_v25.model
Module Contents
Classes
Functions
Data
API
Bases: Module
MiMoV2 hybrid attention (full or sliding-window).
Bases: Module
Bases: HFCheckpointingMixin, Module, MoEFSDPSyncMixin
NeMo AutoModel causal LM wrapper for MiMo-V2.5-Pro.
Keep the SWA rotary embedding on every PP stage.
Compute logits or pass hidden states to the next pipeline stage.
Parameters:
Token IDs of shape [batch, sequence] on the first stage, or hidden states of shape [batch, sequence, hidden] thereafter.
Optional embeddings of shape [batch, sequence, hidden].
Optional positions of shape [batch, sequence] or [1, sequence] for broadcasting across the batch.
Optional padding mask of shape [batch, sequence] or additive attention mask of shape [batch, 1, sequence, sequence].
Optional padding indicators of shape [batch, sequence].
Number of trailing token positions to retain, or indices of shape [retained_sequence]. Zero retains all positions.
Whether to include the decoder hidden states.
Additional decoder arguments, including optional cache_position of shape [sequence].
Returns: CausalLMOutputWithPast
A model output containing logits of shape [batch, retained_sequence,
Bases: Module
Build full and sliding masks for the uncached training sequence.
Parameters:
Embeddings of shape [batch, sequence, hidden].
Padding mask of shape [batch, sequence], an additive mask of shape [batch, 1, sequence, sequence], or a mapping of attention types to masks with that four-dimensional layout.
Positions of shape [batch, sequence] or [1, sequence].
Returns: dict[str, torch.Tensor]
Full and sliding additive masks of shape [batch, 1, sequence, sequence].
Run the decoder layers owned by this pipeline stage.
Parameters:
Token IDs of shape [batch, sequence] on the embedding stage, or hidden states of shape [batch, sequence, hidden] on later stages.
Optional embeddings of shape [batch, sequence, hidden].
Optional positions of shape [batch, sequence] or [1, sequence] for broadcasting across the batch.
Optional padding mask of shape [batch, sequence] or additive attention mask of shape [batch, 1, sequence, sequence].
Optional padding indicators of shape [batch, sequence].
Optional token positions of shape [sequence].
Unused compatibility arguments.
Returns: torch.Tensor
Hidden states of shape [batch, sequence, hidden], normalized only
Bases: Module