MCPcopy Index your code
hub / github.com/THUDM/GLM / load

Method load

model/modeling_bert.py:831–837  ·  view source on GitHub ↗
(module, prefix='')

Source from the content-addressed store, hash-verified

829 state_dict._metadata = metadata
830
831 def load(module, prefix=''):
832 local_metadata = {} if metadata is None else metadata.get(prefix[:-1], {})
833 module._load_from_state_dict(
834 state_dict, prefix, local_metadata, True, missing_keys, unexpected_keys, error_msgs)
835 for name, child in module._modules.items():
836 if child is not None:
837 load(child, prefix + name + '.')
838
839 load(model, prefix='' if hasattr(model, 'bert') else 'bert.')
840 if len(missing_keys) > 0:

Callers 15

get_argsFunction · 0.80
print_and_save_argsFunction · 0.80
load_checkpointFunction · 0.80
process_grid.pyFile · 0.80
change_mp.pyFile · 0.80
load_pretrainedFunction · 0.80
from_pretrainedMethod · 0.80
mainFunction · 0.80
load_examplesMethod · 0.80
_create_examplesMethod · 0.80
_create_examplesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected