nemo_automodel.components.models.qwen3_omni_moe.model
nemo_automodel.components.models.qwen3_omni_moe.model
Module Contents
Classes
Data
API
Bases: HFCheckpointingMixin, HFQwen3OmniMoeThinkerForConditionalGeneration, MoEFSDPSyncMixin
Qwen3OmniMoe Thinker for Conditional Generation with multimodal support.
Forward pass with multimodal fusion.
Parameters:
Integer token IDs of shape [batch, sequence].
Audio features of shape [audios, mel_bins, frames].
Packed image patches of shape [image_patches, patch_features], where patch_features flattens channels, temporal depth, height, and width.
Packed video patches of shape [video_patches, patch_features].
Integer temporal/height/width grids of shape [images, 3].
Integer temporal/height/width grids of shape [videos, 3].
Padding mask of shape [batch, sequence].
Valid audio frames of shape [audios, frames].
Valid frame counts of shape [audios].
Rotary coordinates of shape [3, batch, sequence].
Valid token mask of shape [batch, sequence].
Optional embeddings of shape [batch, sequence, hidden].
Target token IDs of shape [batch, sequence].
Whether to output router logits
Whether audio is in video
Temporal grid spacing of shape [videos].
Integer count or index tensor of shape [selected_positions].
If > 0, only compute logits for the last
logits_to_keep token positions (0 = all positions). Enables
memory-efficient fused cross-entropy by letting the recipe request
a single-position lm_head projection alongside the final hidden
states.
When set, the returned output carries the final
hidden states (the input to lm_head) so the recipe can run
fused linear cross-entropy.
Additional attention arguments
Returns: torch.Tensor | dict | CausalLMOutputWithPast
Logits of shape [batch, selected_sequence, vocab] (or [tokens, vocab]
Bases: Module
Qwen3OmniMoe Thinker Text Model with MRoPE and sparse MoE layers.
visual_pos_masks (torch.Tensor of shape (batch_size, seqlen), optional):
The mask of the visual positions.
deepstack_visual_embeds (list[torch.Tensor], optional):
The deepstack visual embeddings. The shape is (num_layers, visual_seqlen, embed_dim).
The feature is extracted from the different visual encoder layers, and fed to the decoder
hidden states. It’s from the paper DeepStack(https://arxiv.org/abs/2406.04334).
Bases: HFQwen3OmniMoeThinkerTextRotaryEmbedding
Ensure HF rotary frequency buffers stay fp32 across module-wide casts.