nemo_automodel.components.models.minimax_m2.model
nemo_automodel.components.models.minimax_m2.model
Module Contents
Classes
Data
API
Bases: Module
MiniMax-M2 transformer block with attention + MoE.
input_layernorm
mlp
post_attention_layernorm
self_attn
Bases: HFCheckpointingMixin, Module, MoEFSDPSyncMixin
_keep_in_fp32_modules_strict
backend
lm_head
model
state_dict_adapter
tie_word_embeddings_support
Forward pass returning CausalLMOutputWithPast.
Parameters:
input_ids
Input token IDs. BSHD: [B, S]; THD: [1, T] (squeezed internally).
position_ids
Optional position indices.
attention_mask
Optional attention mask.
padding_mask
Optional padding mask.
logits_to_keep
If 0, compute logits for all positions (training default);
otherwise only compute logits for the last logits_to_keep token positions.
output_hidden_states
Whether to return the final hidden states on the output.
**attn_kwargs
Additional arguments forwarded to the base model (e.g. qkv_format).
Returns: CausalLMOutputWithPast
class:~transformers.modeling_outputs.CausalLMOutputWithPast with logits
classmethod
classmethod
Bases: Module
embed_tokens
head_dim
layers
max_seq_len
moe_config
norm
rotary_emb