Skip to content

Commit

Permalink
[bug] fix torch warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecovlee committed Oct 9, 2024
1 parent 624c931 commit ac8ff26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moe_peft/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ac8ff26

Please sign in to comment.