From 7a23f60ad5ce25e80c3d5f3ab3badfb413743daa Mon Sep 17 00:00:00 2001 From: Saaketh Narayan Date: Tue, 17 Sep 2024 12:54:28 -0700 Subject: [PATCH] Delete unneeded inner base model in PEFT HF Checkpointer (#1532) --- llmfoundry/callbacks/hf_checkpointer.py | 1 + 1 file changed, 1 insertion(+) 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(