diff --git a/moe_peft/model.py b/moe_peft/model.py index fd79429..5ff69a7 100644 --- a/moe_peft/model.py +++ b/moe_peft/model.py @@ -672,7 +672,9 @@ def load_adapter(self, name_or_path: str, adapter_name: Optional[str] = None): lora_config = lora_config_factory(json.load(fp)) lora_config.adapter_name = adapter_name lora_weight = torch.load( - name_or_path + os.sep + "adapter_model.bin", map_location=self.device_ + name_or_path + os.sep + "adapter_model.bin", + map_location=self.device_, + weights_only=False, ) self.init_adapter(lora_config, lora_weight)