修复模型加载方法,使用正确的实例方法加载状态字典
This commit is contained in:
parent
fd913748ca
commit
515f261824
|
|
@ -585,7 +585,7 @@ class MoEModel(nn.Module):
|
||||||
state_dict = torch.load(
|
state_dict = torch.load(
|
||||||
state_dict_path, weights_only=True, map_location=self.device
|
state_dict_path, weights_only=True, map_location=self.device
|
||||||
)
|
)
|
||||||
self.model.load_state_dict(state_dict)
|
self.load_state_dict(state_dict)
|
||||||
|
|
||||||
def load_from_pretrained_base_model(
|
def load_from_pretrained_base_model(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue