Skip to content

Commit

Permalink
Skip processing if extra_state loads as None (#11778)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Lasek <[email protected]>
  • Loading branch information
janekl authored Jan 8, 2025
1 parent eb9848b commit ee12d88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nemo/export/trt_llm/nemo_ckpt_loader/nemo_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def preprocess_scaling_factors_for_local_export(state_dict: Dict[str, Any]) -> D
scales = {}

for key, value in scales_dict.items():
if value is None:
continue

value.seek(0)
extra_state = torch.load(value)
if extra_state is not None and 'scale_fwd' in extra_state:
Expand Down

0 comments on commit ee12d88

Please sign in to comment.