nemo_automodel.components.datasets.llm.mock
nemo_automodel.components.datasets.llm.mock
Module Contents
Classes
Functions
Data
API
Dataclass
Construction-time configuration for the mock unpacked dataset (tokenizer is a build arg).
accepts_tokenizer
max_sentence_len
Maximum sentence length.
mean_len
Mean sentence length (Gaussian).
num_sentences
Number of sentence examples 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 unpacked :class:~datasets.Dataset from this :class:MockUnpackedDatasetConfig.
Build a dataset where each example is one sentence (variable length).
Returns:
- a HuggingFace Dataset with fields: input_ids: Sequence(int64) attention_mask:Sequence(int8) labels: Sequence(int64) position_ids: Sequence(int64)
Sentence generator with Gaussian length control.
Build a trivial vocab; index 0=<pad>, 1=<eos>, rest = tok_i.