cerebras.modelzoo.data.nlp.gpt.config.GptHDF5DataProcessorConfig#
- class cerebras.modelzoo.data.nlp.gpt.config.GptHDF5DataProcessorConfig(batch_size: int = <object object at 0x7f9345f8db90>, shuffle: bool = True, shuffle_seed: int = 0, num_workers: int = 0, prefetch_factor: int = 10, persistent_workers: int = True, shuffle_buffer: Optional[int] = None, drop_last: bool = True, data_dir: Union[str, List[str]] = <object object at 0x7f9345f8db90>, max_sequence_length: Optional[int] = None, use_vsl: bool = False)[source]#
- data_dir: Union[str, List[str]] = <object object>#
The path to the HDF5 files.
- 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
- 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.
- use_vsl: bool = False#
- batch_size: int = <object object>#
Batch size to be used
- num_workers: int = 0#
The number of PyTorch processes used in the dataloader
- persistent_workers: int = True#
Whether or not to keep workers persistent between epochs
- prefetch_factor: int = 10#
The number of batches to prefetch in the dataloader
- shuffle: bool = True#
Whether or not to shuffle the dataset
- shuffle_buffer: Optional[int] = None#
Size of shuffle buffer in samples.
- shuffle_seed: int = 0#
Seed used for deterministic shuffling