Skip to content

Commit 0258f04

Browse files
committed
update torchao safetensors impl
Signed-off-by: Angel Li <liangel@meta.com>
1 parent 1109f98 commit 0258f04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/model_executor/model_loader/weight_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ def safetensors_weights_iterator(
641641
if safetensors_load_strategy == "eager":
642642
loading_desc += " (eager)"
643643

644-
state_dict = {}
645644
leftover_state_dict: dict[str, torch.Tensor] = {}
646645

647646
for st_file in tqdm(
@@ -667,6 +666,7 @@ def safetensors_weights_iterator(
667666
)
668667

669668
with safe_open(st_file, framework="pt") as f:
669+
state_dict = {}
670670
for name in f.keys(): # noqa: SIM118
671671
state_dict[name] = f.get_tensor(name)
672672

0 commit comments

Comments
 (0)