Skip to content

Commit a7e5612

Browse files
Apply suggestion from @gemini-code-assist[bot]
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent ba3e743 commit a7e5612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

verl/workers/engine/fsdp/transformer_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def _restore_w4a4_input_scales(self, model, model_path):
480480

481481
module = model
482482
for part in module_path.split("."):
483-
module = getattr(module, part)
483+
module = module[int(part)] if part.isdigit() else getattr(module, part)
484484

485485
scale_val = f.get_tensor(key)
486486
val = scale_val.item() if scale_val.numel() == 1 else scale_val.max().item()

0 commit comments

Comments
 (0)