Unverified Commit f5a37c6c authored by Woosuk Kwon's avatar Woosuk Kwon Committed by GitHub
Browse files

[BugFix] Fix a bug in loading safetensors (#1732)

parent 32c927b5
......@@ -240,7 +240,7 @@ def hf_model_weights_iterator(
elif use_safetensors:
for st_file in hf_weights_files:
with safe_open(st_file, framework="pt") as f:
for name in f:
for name in f.keys(): # noqa: SIM118
param = f.get_tensor(name)
yield name, param
else:
......
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