nemo_automodel.components.datasets.llm.mock_iterable_dataset
nemo_automodel.components.datasets.llm.mock_iterable_dataset
Module Contents
Classes
API
Bases: IterableDataset
Mock dataset that generates synthetic data for benchmarking.
This dataset generates random tokens similar to the benchmarking script, creating input_ids, labels, and position_ids for each sample.
Generate synthetic batches.
Return the number of samples.
Uniform random [batch_size, seq_len] ids over the vocabulary minus exclude_token_ids.
Construction-time configuration for :class:MockIterableDataset.
Batch size to yield (1 for unbatched samples).
Token ids never emitted in input_ids (e.g. the model’s pad_token_id).
Total number of samples to generate (1M for an infinite-like dataset).
Sequence length for each sample.
Size of the vocabulary for generating random tokens.
Build a :class:MockIterableDataset from this :class:MockIterableDatasetConfig.