nemo_automodel.components.datasets.vlm.loader
nemo_automodel.components.datasets.vlm.loader
Typed construction for VLM processors, datasets, packing, and dataloaders.
Module Contents
Classes
Data
API
Dataset config whose build requires the runtime data-parallel rank.
Build the per-rank dataset shard.
Declarative VLM collator factory.
Function that accepts examples and the runtime processor.
Declarative keyword arguments bound once while building the dataloader.
Bind the runtime processor to the configured collator.
Materialized VLM dataloader and its processor.
Typed construction config for the complete VLM input pipeline.
Build the processor and raw dataset under the caller-owned ordering context.
Build the processor, dataset wrappers, sampler, collator, and dataloader.
Parameters:
Runtime model identifier used to build the processor.
Rank within the data-parallel group.
Size of the data-parallel group.
Runtime local training batch size.
Optional rank-ordering context used only for processor and source-dataset build.
Optional model callback used to create packed multimodal position IDs.
Resolved attention backend for packed-mask construction.
Optional pipeline microbatch count used to pre-chunk media tensors.
Returns: VlmDataloaderBuild
Named result containing the stateful dataloader and runtime processor.
Resolve the packed-collator mask backend.
Parameters:
Attention implementation selected by the model config.
Runtime context-parallel world size.
Returns: str | None
Attention implementation used to choose the packed attention-mask representation.
Declarative processor factory and keyword arguments.
Configured processor factory; None selects AutoProcessor.from_pretrained.
Declarative keyword arguments for the configured processor factory.
Build the configured processor.
Parameters:
Runtime model identifier used by the default AutoProcessor factory.
Returns: ProcessorMixin | None
Processor instance, or None when the model has no compatible AutoProcessor.