mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-04 04:32:50 +08:00
Pass additional_target to unsloth
Fixes #3200 Former-commit-id: b5eefe5c4c084b63a12b023cae877fcd1914d4fc
This commit is contained in:
parent
0e08c209c4
commit
3dccd3c67e
@ -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