nemo_automodel.components.datasets.multimodal.datasets
nemo_automodel.components.datasets.multimodal.datasets
BAGEL multimodal datasets: VLM-SFT, T2I pretrain, unified image editing.
The three dataset families emit the data-yield surface needed for the
3-group example.yaml mixture to be iterated by AM’s
:class:.packing.PackedDataset. Stage 1 consumes only the understanding-side
loss-bearing pieces; Stage 2 additionally consumes VAE-image plan entries for
flow-matching loss. VAE encode, MSE computation, noise sampling, and timestep
embedding are intentionally training/model concerns, not dataset concerns.
Module Contents
Classes
Functions
Data
API
Bases: DistributedIterableDataset
Iterable over conversation JSONL rows where each row may reference images.
Bases: DistributedIterableDataset
Iterable over a parquet-sharded (image, captions) text-to-image dataset.
The yielded dict carries only one image tensor (the VAE input). Stage 1
models ignore the VAE branch; Stage 2 consumes it via the PackedDataset
vae_image branch + flow-matching loss. No VAE encoding happens in
the data pipeline — just tensor preparation.
Build a BAGEL packed dataset for Stage 1 or Stage 2 training.
grouped_datasets is the YAML dict produced by data/configs/*.yaml.
dataset_info is required and contains the concrete local paths for each
dataset named by grouped_datasets.
Returns the constructed :class:PackedDataset instance. The caller is
still responsible for invoking set_epoch immediately before
DataLoader iteration (and for the pre-iter RNG reseed — see
:meth:PackedDataset.set_epoch docstring).