diff --git a/swift/trainers/mixin.py b/swift/trainers/mixin.py index 24cfb86fd9..dc8c740970 100644 --- a/swift/trainers/mixin.py +++ b/swift/trainers/mixin.py @@ -564,7 +564,10 @@ def _load_best_model(self): adapter_name) state_dict = SwiftModel.load_state_file(sub_folder) if state_dict is not None: - self.model.load_state_dict(state_dict, strict=False) + self.model.load_state_dict( + state_dict, + strict=False, + adapter_name=adapter_name) state_dict = SwiftModel.load_state_file( self.state.best_model_checkpoint) if state_dict is not None: