nemo_automodel.components.datasets.multimodal.collate_fns
nemo_automodel.components.datasets.multimodal.collate_fns
Multimodal collate functions.
BAGEL uses packed sequences (samples concatenated along the sequence
axis with a cumulative-seqlens index), not left/right padding. The collate
function is essentially a pass-through that wraps the single packed dict
produced by :class:PackedDataset in a SimpleCustomBatch with
pin_memory / cuda helpers.
Module Contents
Classes
Functions
API
Pass-through wrapper around one packed batch from :class:PackedDataset.
attn_modes
batch_data_indexes
ce_loss_indexes
ce_loss_weights
mse_loss_indexes
nested_attention_masks
packed_label_ids
packed_latent_position_ids
packed_position_ids
packed_text_ids
packed_text_indexes
packed_timesteps
packed_vae_token_indexes
packed_vit_position_ids
packed_vit_token_indexes
packed_vit_tokens
padded_images
patchified_vae_latent_shapes
sample_lens
sequence_length
split_lens
use_flex
vit_token_seqlens
Canonical name in AM’s collate-fn registry.
Return the BAGEL-style identity collate (wraps a single packed dict).