MCPcopy
hub / github.com/deepspeedai/DeepSpeedExamples / save

Method save

bing_bert/turing/models.py:117–119  ·  view source on GitHub ↗
(self, filename: str)

Source from the content-addressed store, hash-verified

115 self.device = device
116
117 def save(self, filename: str):
118 network=self.network.module
119 return torch.save(network.state_dict(), filename)
120
121 def load(self, model_state_dict: str):
122 return self.network.module.load_state_dict(torch.load(model_state_dict, map_location=lambda storage, loc: storage))

Callers 6

save_bertMethod · 0.45
save_zero_checkpointFunction · 0.45
save_checkpointFunction · 0.45
tokenize_corpusFunction · 0.45

Calls 1

state_dictMethod · 0.45

Tested by

no test coverage detected