Pass additional_target to unsloth

Fixes #3200
This commit is contained in:
Erich Schubert 2024-04-09 17:53:40 +02:00 committed by GitHub
parent 7f6c2486b8
commit b5eefe5c4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -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(