cerebras.modelzoo.tools.checkpoint_converters.t5.Converter_T5_WithoutOptionalModel_HF_CS23#
- class cerebras.modelzoo.tools.checkpoint_converters.t5.Converter_T5_WithoutOptionalModel_HF_CS23[source]#
Bases:
cerebras.modelzoo.tools.checkpoint_converters.t5.Converter_T5_WithoutOptionalModel_HF_CS21Methods
attempt_mup_to_spconvertconvert_all_keysconvert_dense_layerconvert_embeddingsConverts all keys in a checkpoint from converter_indices.direction format to the other format.
Attempts to convert the old key by matching against the list of conversion rules.
convert_relative_attention_bias_cs16_to_cs17convert_relative_attention_bias_cs17_to_cs16convert_relative_attention_bias_cs17_to_hfconvert_relative_attention_bias_hf_to_cs21converter_noteextract_model_dictfile_formatsformatsget_config_converter_classget_converter_indicesget_mup_converterinit_output_checkpointloadpost_checkpoint_convertpost_model_convertpre_checkpoint_convertpre_model_convertCopies value that exists at old_state_dict's old_key to new_state_dict's new_key.
savesupports_conversionsupports_mup_conversion- convert_helper(input_checkpoint, configs, converter_indices, output_checkpoint={}, drop_unmatched_keys=False, no_progress_bar=True, debug=False)#
Converts all keys in a checkpoint from converter_indices.direction format to the other format. Conversion will fail if at least one of the keys did not match on any conversion rules and drop_unmatched_keys is not enabled. Returns the newly converted checkpoint.
- convert_key(old_key, old_state_dict, new_state_dict, from_index, match_start=0, prefix='', action_fn_args=None, debug=False)#
Attempts to convert the old key by matching against the list of conversion rules. The first rule to match is used for conversion (i.e. even if multiple rules would match, the latter ones are never used). Returns True if a conversion occurred.
- static replaceKey(old_key, new_key, old_state_dict, new_state_dict, from_index, action_fn_args=None)#
Copies value that exists at old_state_dict’s old_key to new_state_dict’s new_key.