mirror of
https://github.com/Vision-CAIR/MiniGPT-4.git
synced 2025-04-05 10:30:45 +00:00
fix: update peft imports
replace a deprecated function "prepare_model_for_kbit_training"
This commit is contained in:
parent
71df7647b6
commit
5de8fce3bb
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user