Unverified Commit 1963245e authored by Russell Bryant's avatar Russell Bryant Committed by GitHub
Browse files

[Core] Use weights_only=True with torch.load (#32045)


Signed-off-by: default avatarRussell Bryant <rbryant@redhat.com>
parent 03089019
......@@ -762,7 +762,7 @@ def tensorize_lora_adapter(lora_path: str, tensorizer_config: TensorizerConfig):
if tensor_path.endswith(".safetensors"):
tensors = safetensors.torch.load_file(tensor_path)
elif tensor_path.endswith(".bin"):
tensors = torch.load(tensor_path)
tensors = torch.load(tensor_path, weights_only=True)
else:
raise ValueError("Unsupported file: %s", tensor_path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment