Skip to content

Commit 6c7d87b

Browse files
fix tuner (#567)
1 parent d607b1a commit 6c7d87b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

swift/llm/tuner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def prepare_model(model, args: SftArguments):
7676
'rank_pattern': args.lora_rank_pattern,
7777
'alpha_pattern': args.lora_alpha_pattern,
7878
'loftq_config': args.lora_loftq_config,
79+
'use_rslora': args.use_rslora,
7980
'use_dora': args.use_dora,
8081
}
8182
if args.sft_type == 'lora':
@@ -84,6 +85,7 @@ def prepare_model(model, args: SftArguments):
8485
lora_config = LoRAConfig(
8586
lora_dtype=args.lora_dtype, **lora_kwargs)
8687
elif args.tuner_backend == 'peft':
88+
assert args.lora_lr_ratio is None, 'Please use tuner_backend="swift" to use LoRA+'
8789
lora_config = LoraConfig(
8890
task_type='CAUSAL_LM', **lora_kwargs)
8991
model = Swift.prepare_model(model, lora_config)

0 commit comments

Comments
 (0)