We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92e1179 commit 655583aCopy full SHA for 655583a
swift/llm/tuner.py
@@ -119,6 +119,9 @@ def prepare_model(model, args: SftArguments):
119
'init_lora_weights': args.init_lora_weights,
120
}
121
if args.sft_type in ('lora', 'longlora'):
122
+ # Fix the name of the layer in xcomposer that contains Plora.
123
+ if any(['lora_' in n for n, p in model.named_parameters()]):
124
+ model.requires_grad_(False)
125
if args.lora_dtype == 'AUTO':
126
args.lora_dtype = None
127
if args.tuner_backend == 'swift':
0 commit comments