cerebras.modelzoo.data.nlp.bert.config.BertCSVDynamicMaskDataProcessorConfig#

class cerebras.modelzoo.data.nlp.bert.config.BertCSVDynamicMaskDataProcessorConfig(batch_size: int = <object object at 0x7f9345f8db90>, 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]] = <object object at 0x7f9345f8db90>, max_sequence_length: int = <object object at 0x7f9345f8db90>, max_predictions_per_seq: int = <object object at 0x7f9345f8db90>, vocab_file: Optional[str] = None, shuffle_buffer: Optional[int] = None, mask_whole_word: bool = False, do_lower: bool = False, dynamic_mlm_scale: bool = False, buckets: Optional[List[int]] = None, drop_last: bool = True, oov_token: str = '[UNK]', mask_token: str = '[MASK]', document_separator_token: str = '[SEP]', exclude_from_masking: List[str] = <factory>, masked_lm_prob: float = 0.15, gather_mlm_labels: bool = True, mixed_precision: bool = False, disable_nsp: bool = False, labels_pad_id: int = 0, input_pad_id: int = 0, attn_mask_pad_id: int = 0, segment_pad_id: int = 0)[source]#
data_dir: Union[str, List[str]] = <object object>#

The path to the HDF5 files.

max_sequence_length: int = <object object>#
max_predictions_per_seq: int = <object object>#
vocab_file: Optional[str] = None#
shuffle_buffer: Optional[int] = None#

Size of shuffle buffer in samples.

mask_whole_word: bool = False#
do_lower: bool = False#
dynamic_mlm_scale: bool = False#
buckets: Optional[List[int]] = 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.

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

oov_token: str = '[UNK]'#
mask_token: str = '[MASK]'#
document_separator_token: str = '[SEP]'#
exclude_from_masking: List[str]#
masked_lm_prob: float = 0.15#
gather_mlm_labels: bool = True#
mixed_precision: bool = False#
disable_nsp: bool = False#
labels_pad_id: int = 0#
input_pad_id: int = 0#
attn_mask_pad_id: int = 0#
segment_pad_id: int = 0#
batch_size: int = <object object>#

Batch size to be used

num_workers: int = 0#

The number of PyTorch processes used in the dataloader

shuffle: bool = True#

Whether or not to shuffle the dataset

shuffle_seed: int = 0#

Seed used for deterministic shuffling