修复模型加载方法,使用正确的实例方法加载状态字典

This commit is contained in:
songsenand 2026-02-15 00:25:38 +08:00
parent fd913748ca
commit 515f261824
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ class MoEModel(nn.Module):
state_dict = torch.load(
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(
self,