Skip to content

Commit

Permalink
add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
plusbang committed Dec 2, 2024
1 parent 597075b commit 681017d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/llm/src/ipex_llm/transformers/npu_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ def ignore_argument(kwargs: dict, key: "str"):


def save_low_bit(self, model_dir: str, *args, **kwargs):
<<<<<<< HEAD
=======
if hasattr(self, "save_directory"):
warnings.warn(f"Model is already saved at {self.save_directory}")
return 1
>>>>>>> 714887ef85 (save_directory is required argument for all models)
origin_device = self.device
kwargs["safe_serialization"] = False
self.save_pretrained(model_dir, *args, **kwargs)
Expand Down

0 comments on commit 681017d

Please sign in to comment.