cerebras.modelzoo.tools.checkpoint_converters.mm_simple.Converter_MMSimple_LLaVA_HF_CS23#
- class cerebras.modelzoo.tools.checkpoint_converters.mm_simple.Converter_MMSimple_LLaVA_HF_CS23[source]#
Bases:
cerebras.modelzoo.tools.checkpoint_converters.helper.Build_HF_CS_Converter_WithOptionalModel.<locals>.ConverterWithOptionalModelMethods
architecturesattempt_mup_to_spcomponent_namesconvertconvert_all_keysconvert_helperAttempts to convert the old key by matching against the list of conversion rules.
converter_noteconvertersextract_model_dictfile_formatsformatsget_config_converter_classget_converter_indicesAllows models to override the default muP converters with their own
init_output_checkpointloadpost_checkpoint_convertpost_model_convertpre_checkpoint_convertHook executes right before model conversion.
Copies value that exists at old_state_dict's old_key to new_state_dict's new_key.
savesupports_conversionsupports_mup_conversion- 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.
- get_mup_converter()#
Allows models to override the default muP converters with their own
- pre_model_convert(old_state_dict, new_state_dict, configs, converter_indices, drop_unmatched_keys)#
Hook executes right before model conversion.
- 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.