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

class cerebras.modelzoo.data.nlp.gpt.config.GptHDF5DataProcessorConfig(*args, **kwargs)[source]#
data_processor#
data_dir = Ellipsis#

The path to the HDF5 files.

max_sequence_length = 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 = 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.

batch_size = Ellipsis#

Batch size.

shuffle = Ellipsis#

Flag to enable data shuffling.

shuffle_seed = None#

Shuffle seed.

use_vsl = False#

Flag to enable variable sequence length training. It requires the dataset to have two extra features: the attention_span of keys and the position_ids of tokens.

repeat = None#
use_multiple_workers = None#
mixed_precision = None#
fp16_type = None#
classmethod check_for_deprecated_fields()#

classmethod(function) -> method

Convert a function to be a class method.

A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this idiom:

class C:

@classmethod def f(cls, arg1, arg2, …):

It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. If a class method is called for a derived class, the derived class object is passed as the implied first argument.

Class methods are different than C++ or Java static methods. If you want those, see the staticmethod builtin.

check_literal_discriminator_field(data)#
copy(*, validate=True, **kwargs)#
discriminator = 'data_processor'#
property discriminator_value#
features_list = ['input_ids', 'attention_mask', 'labels']#

List of features to include in the batch

classmethod get_orig_class()#
get_orig_class_args(**kwargs)#
model_copy(**kwargs)#
model_post_init(context)#
num_workers = 0#

How many subprocesses to use for data loading.

persistent_workers = True#

If True, the data loader will not shutdown the worker processes after a dataset has been consumed once.

post_init(context)#
prefetch_factor = 10#

Number of batches loaded in advance by each worker.

shuffle_buffer = None#

Size of shuffle buffer in samples.

vocab_size = None#