mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 23:58:11 +08:00
Pass additional_target to unsloth
Fixes #3200 Former-commit-id: f8f87f5b0549cba6a011749c42064047f82ba577
This commit is contained in:
parent
566d71b7a9
commit
95a4589bbf
@ -145,6 +145,8 @@ def init_adapter(
|
||||
from unsloth import FastLanguageModel # type: ignore
|
||||
|
||||
unsloth_peft_kwargs = {"model": model, "max_seq_length": model_args.model_max_length}
|
||||
if finetuning_args.additional_target:
|
||||
unsloth_peft_kwargs["modules_to_save"] = finetuning_args.additional_target
|
||||
model = FastLanguageModel.get_peft_model(**peft_kwargs, **unsloth_peft_kwargs)
|
||||
else:
|
||||
lora_config = LoraConfig(
|
||||
|
Loading…
x
Reference in New Issue
Block a user