Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
v-chen_data committed Nov 20, 2024
1 parent d39181c commit 67dce2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/inference/convert_composer_mpt_to_ft.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def write_ft_checkpoint_from_composer_checkpoint(

# Extract the model weights
weights_state_dict = composer_state_dict['state']['model']
torch.nn.modules.utils.consume_prefix_in_state_dict_if_present(
torch.nn.modules.utils.consume_prefix_in_state_dict_if_present( # pyright: ignore
weights_state_dict,
prefix='model.',
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/inference/convert_composer_to_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def write_huggingface_pretrained_from_composer_checkpoint(
weights_state_dict = composer_state_dict
if 'state' in weights_state_dict:
weights_state_dict = weights_state_dict['state']['model']
torch.nn.modules.utils.consume_prefix_in_state_dict_if_present(
torch.nn.modules.utils.consume_prefix_in_state_dict_if_present( # pyright: ignore
weights_state_dict,
prefix='model.',
)
Expand Down

0 comments on commit 67dce2e

Please sign in to comment.