diff --git a/finetune.py b/finetune.py index 0e74641d..022d784b 100644 --- a/finetune.py +++ b/finetune.py @@ -260,12 +260,12 @@ def generate_and_tokenize_prompt(data_point): ) model.config.use_cache = False - old_state_dict = model.state_dict - model.state_dict = ( - lambda self, *_, **__: get_peft_model_state_dict( - self, old_state_dict() - ) - ).__get__(model, type(model)) + #old_state_dict = model.state_dict + #model.state_dict = ( + # lambda self, *_, **__: get_peft_model_state_dict( + # self, old_state_dict() + # ) + #).__get__(model, type(model)) if torch.__version__ >= "2" and sys.platform != "win32": model = torch.compile(model)