Skip to content

Commit

Permalink
Delete unneeded inner base model in PEFT HF Checkpointer (mosaicml#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
snarayan21 authored Sep 17, 2024
1 parent 9a1b78b commit 7a23f60
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llmfoundry/callbacks/hf_checkpointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ def tensor_hook(
new_base_model_instance,
original_model.peft_config[active_adapter],
)
del new_base_model_instance
else:
new_model_instance = type(original_model)(new_config)
new_model_instance.generation_config.update(
Expand Down

0 comments on commit 7a23f60

Please sign in to comment.