cerebras.modelzoo.tools.checkpoint_converters.mm_simple.ConfigConverter_MMSimple_LLaVA_HF_CS23#

class cerebras.modelzoo.tools.checkpoint_converters.mm_simple.ConfigConverter_MMSimple_LLaVA_HF_CS23[source]#

Bases: cerebras.modelzoo.tools.checkpoint_converters.llava.ConfigConverter_LLaVA_HF_CS22

Methods

assert_factory_fn

attempt_mup_to_sp

Determines whether muP -> sP conversion is should be attempted.

component_names

convert

convert_all_keys

convert_helper

convert_key

Attempts to convert the old key by matching against the list of conversion rules.

converter_note

converters

file_formats

formats

get_converter_indices

get_mup_converter

Allows models to override the default muP converters with their own

load

post_config_convert

pre_config_convert

config: List[dicts] if converter_indices = 0 (HF-> CS) else dict (CS->HF)

replaceKey

Copies value that exists at old_state_dict's old_key to new_state_dict's new_key.

save

supports_conversion

supports_mup_conversion

Determines whether muP -> sP conversion is supported for this model.

Attributes

preprocessor_config_defaults

attempt_mup_to_sp()#

Determines whether muP -> sP conversion is should be attempted. Some HF models (such as BTLM) should not attempt muP -> sP conversion since they can natively handle muP.

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_config_convert(config, converter_indices)#

config: List[dicts] if converter_indices = 0 (HF-> CS) else dict (CS->HF)

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.

supports_mup_conversion()#

Determines whether muP -> sP conversion is supported for this model.