diff --git a/llmfoundry/callbacks/hf_checkpointer.py b/llmfoundry/callbacks/hf_checkpointer.py index 4e6a501f2f..65bdcb3b6c 100644 --- a/llmfoundry/callbacks/hf_checkpointer.py +++ b/llmfoundry/callbacks/hf_checkpointer.py @@ -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(