cerebras.modelzoo.data_preparation.nlp.t5.utils.pad_t5_input_features#

cerebras.modelzoo.data_preparation.nlp.t5.utils.pad_t5_input_features(src_max_sequence_length, tgt_max_sequence_length, input_pad_id, attn_mask_pad_id, labels_pad_id, features)[source]#

Provides padding for T5 input features.

Parameters
  • src_max_sequence_length

  • tgt_max_sequence_length

  • input_pad_id

  • attn_mask_pad_id

  • labels_pad_id

  • features

Returns

dict with padded features.