From 5de8fce3bb718b38bb5a1870eec6517c73fa3a9c Mon Sep 17 00:00:00 2001 From: 3luka <94873742+MohamedAlaaAli@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:23:28 +0300 Subject: [PATCH] fix: update peft imports replace a deprecated function "prepare_model_for_kbit_training" --- minigpt4/models/base_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minigpt4/models/base_model.py b/minigpt4/models/base_model.py index d70ca18..e47d38e 100644 --- a/minigpt4/models/base_model.py +++ b/minigpt4/models/base_model.py @@ -17,7 +17,7 @@ from transformers import LlamaTokenizer from peft import ( LoraConfig, get_peft_model, - prepare_model_for_int8_training, + prepare_model_for_kbit_training, ) from minigpt4.common.dist_utils import download_cached_file @@ -188,7 +188,7 @@ class BaseModel(nn.Module): ) if lora_r > 0: - llama_model = prepare_model_for_int8_training(llama_model) + llama_model = prepare_model_for_kbit_training(llama_model) loraconfig = LoraConfig( r=lora_r, bias="none",