Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion optimum/fx/parallelization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def convert_bin_to_safetensors(
output_dir = cache_dir if cache_dir else weight_file_path.parent
output_file_path = os.path.join(output_dir, safetensors_filename)
if not os.path.isfile(output_file_path):
checkpoint = torch.load(weight_file, map_location=torch.device("cpu"))
checkpoint = torch.load(weight_file, map_location=torch.device("cpu"), weights_only=True)
data_pointers = set()
for k, v in checkpoint.items():
if v.data_ptr() in data_pointers:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


REQUIRED_PKGS = [
"transformers>=4.29",
"transformers>=4.29,<6.0",
"torch>=1.11",
"packaging",
"numpy",
Expand Down