Fix LoftQ with FastBaseModel (#2826)
Pass `init_lora_weights` and `loftq_config` to `LoraConfig` constructor, which enables classes like `FastModel` to use LoftQ support. Thank you very much in advance!
This commit is contained in:
parent
be38f500d0
commit
cb9f5bb923
1 changed files with 9 additions and 7 deletions
|
|
@ -594,13 +594,15 @@ class FastBaseModel:
|
|||
pass
|
||||
max_seq_length = model.max_seq_length
|
||||
lora_config = LoraConfig(
|
||||
r = r,
|
||||
lora_alpha = lora_alpha,
|
||||
target_modules = target_modules,
|
||||
lora_dropout = lora_dropout,
|
||||
bias = bias,
|
||||
task_type = task_type,
|
||||
use_rslora = use_rslora,
|
||||
r = r,
|
||||
lora_alpha = lora_alpha,
|
||||
target_modules = target_modules,
|
||||
lora_dropout = lora_dropout,
|
||||
bias = bias,
|
||||
task_type = task_type,
|
||||
use_rslora = use_rslora,
|
||||
init_lora_weights = init_lora_weights,
|
||||
loftq_config = loftq_config,
|
||||
)
|
||||
model = prepare_model_for_kbit_training(
|
||||
model,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue