Ver Fonte

changed weights_only=True to false to override security concerns (#973)

tawsif há 10 meses atrás
pai
commit
58046eaa1a
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      tools/llama/merge_lora.py

+ 1 - 1
tools/llama/merge_lora.py

@@ -40,7 +40,7 @@ def merge(lora_config, base_weight, lora_weight, output):
     llama_state_dict = llama_model.state_dict()
     llama_state_dict = {k: v for k, v in llama_state_dict.items() if "lora" not in k}
     llama_state_dict_copy = deepcopy(llama_state_dict)
-    lora_state_dict = torch.load(lora_weight, map_location="cpu")
+    lora_state_dict = torch.load(lora_weight, map_location="cpu", weights_only=False)
 
     if "state_dict" in llama_state_dict:
         llama_state_dict = llama_state_dict["state_dict"]