nemo_automodel.components.datasets.llm.mock_packed
nemo_automodel.components.datasets.llm.mock_packed
Module Contents
Classes
Functions
Data
API
Dataclass
Construction-time configuration for the mock packed dataset (tokenizer is a build arg).
block_size
Token length of each packed block.
max_sentence_len
Maximum sentence length.
mean_len
Mean sentence length (Gaussian).
num_blocks
Number of packed blocks to generate.
seed
Seed for the random generator.
std_len
Standard deviation of sentence length (Gaussian).
vocab_size
Vocabulary size for the synthetic tokens.
Build the mock packed :class:~datasets.Dataset from this :class:MockPackedDatasetConfig.
Dataset builder.
Flush helper (build position_ids that reset after <eos>).
Sentence generator with Gaussian length control.
Build a trivial vocab; index 0=<pad>, 1=<eos>, rest = word_i.