nemo_automodel.components.models.inkling.multimodal
nemo_automodel.components.models.inkling.multimodal
Native Inkling vision, audio, and multimodal composition modules.
Module Contents
Classes
Functions
Data
API
Bases: Module
Embed and sum the independently quantized dMel codebooks.
Embed discretized mel bins.
Parameters:
Long tensor of shape [frames, mel_bins].
Returns: torch.Tensor
Tensor of shape [frames, hidden].
Bases: Module
Native Inkling audio tower.
Encode audio tokens.
Parameters:
Long tensor of shape [frames, mel_bins].
Returns: BaseModelOutputWithPooling
An output whose hidden state and pooler output have shape [frames, hidden].
Initialize the audio embedding and final normalization.
Bases: Module
Compose native text, vision, and audio Inkling towers.
Match multimodal features to placeholder tokens.
Parameters:
Optional long tensor of shape [batch, sequence].
Tensor of shape [batch, sequence, hidden].
Tensor of shape [placeholders, hidden].
Vocabulary ID used as the placeholder.
Returns: torch.Tensor
Boolean tensor of shape [batch, sequence, hidden].
Merge multimodal features and run the text backbone.
Parameters:
Optional long tensor of shape [batch, sequence].
Optional tensor of shape [patches, time, height, width, channels].
Optional long tensor of shape [audios, frames, mel_bins].
Optional boolean tensor of shape [audios, frames].
Optional padding tensor of shape [batch, total_sequence]
or mapping of prepared attention masks.
Optional long tensor of shape [batch, sequence].
Optional model-owned decoding cache.
Optional tensor of shape [batch, sequence, hidden].
Whether to allocate and return a decoding cache.
Additional text-attention arguments.
Returns: InklingModelOutputWithPast
An output whose last hidden state has shape [batch, sequence, hidden].
Project discretized audio into text hidden space.
Parameters:
Long tensor of shape [audios, frames, mel_bins].
Optional boolean tensor of shape [audios, frames].
Returns: BaseModelOutputWithPooling
An output whose hidden state has shape [valid_frames, text_hidden].
Project image/video patches into text hidden space.
Parameters:
Tensor of shape [patches, time, height, width, channels].
Reserved for the common multimodal calling convention.
Returns: BaseModelOutputWithPooling
An output whose pooler output has shape [patches, text_hidden].
Return the text token-embedding module.
Initialize every tower for checkpoint-free construction.
Bases: BaseModelOutputWithPast
Inkling backbone output including projected image features.
Bases: Module
Fold time and space into channels, then project one HMLP stage.
Fold time and two spatial axes into the channel dimension.
Parameters:
Tensor of shape [patches, time, height, width, channels].
Returns: torch.Tensor
Tensor of shape “[patches, time / temporal_fold, height / spatial_fold,
Apply one hierarchical vision projection.
Parameters:
Tensor of shape [patches, time, height, width, channels].
Returns: torch.Tensor
Tensor of shape [patches, folded_time, folded_height, folded_width, output_channels].
Initialize the projection and optional normalization.
Bases: Module
Native hierarchical MLP vision tower.
Encode preprocessed image/video patches.
Parameters:
Tensor of shape [patches, time, height, width, channels].
Reserved for the common multimodal calling convention.
Returns: BaseModelOutputWithPooling
An output whose pooler output has shape [patches, text_hidden].
Initialize every vision projection and normalization.
Select distinct ordered scales with minimum absolute-log cost.
Parameters:
Tensor of shape [layers_plus_one, available_scales].
Returns: torch.LongTensor
Long tensor of shape [layers_plus_one] indexing distinct scales.
Plan the time, height, width, and channel sizes of every HMLP stage.
Return prime factors in ascending order.