cerebras.modelzoo.data.nlp.gpt.config.GptHDF5MapDataProcessorConfig#

class cerebras.modelzoo.data.nlp.gpt.config.GptHDF5MapDataProcessorConfig(batch_size: int = <object object at 0x7f2933a50b80>, shuffle: bool = True, shuffle_seed: int = 0, num_workers: int = 0, prefetch_factor: int = 10, persistent_workers: bool = True, data_dir: Union[str, List[str], NoneType] = None, use_worker_cache: bool = False, max_sequence_length: Optional[int] = None, mixture: Optional[List[dict]] = None, drop_last: bool = True, num_samples: Optional[int] = None, sort_files: bool = True, use_vsl: bool = False, pad_last: bool = False, data_subset: Optional[str] = None, dataset_map_fn: Optional[str] = None)[source]#
data_dir: Optional[Union[str, List[str]]] = None#

The path to the HDF5 files.

use_worker_cache: bool = False#
max_sequence_length: Optional[int] = None#

The sequence length of samples produced by the dataloader. When using the corpus data format, the same preprocessed data will work with any max sequence length, so this may be set at runtime. When using the sample format this must be set to None

mixture: Optional[List[dict]] = None#
drop_last: bool = True#

similar to the PyTorch drop_last setting except that samples that when set to True, samples that would have been dropped at the end of one epoch are yielded at the start of the next epoch so that there is no data loss. This is necessary for a data ordering that is independent of the distributed setup being used.

num_samples: Optional[int] = None#
num_workers: int = 0#

The number of PyTorch processes used in the dataloader

prefetch_factor: int = 10#

The number of batches to prefetch in the dataloader

persistent_workers: bool = True#

Whether or not to keep workers persistent between epochs

sort_files: bool = True#

whether or not the reader should sort the input files. This is included for backwards compatibility and should almost always be set to True

use_vsl: bool = False#

Flag to enable variable sequence length training. It requires the dataset to have two extra features

pad_last: bool = False#
data_subset: Optional[str] = None#
dataset_map_fn: Optional[str] = None#
batch_size: int = <object object>#

Batch size to be used

shuffle: bool = True#

Whether or not to shuffle the dataset

shuffle_seed: int = 0#

Seed used for deterministic shuffling