Skip to content

Commit d56d4a5

Browse files
author
Kerim
committed
update
1 parent ae8881e commit d56d4a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/peft/peft_model.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ def save_pretrained(
251251
path_initial_model_for_weight_conversion = convert_pissa_to_lora
252252

253253
def save_mutated_as_lora(peft_config, path_initial_model_for_weight_conversion, output_state_dict, kwargs):
254-
if not any(str(peft_config.init_lora_weights).lower().startswith(prefix) for prefix in ["pissa", "olora", "true"]):
254+
if not any(
255+
str(peft_config.init_lora_weights).lower().startswith(prefix) for prefix in ["pissa", "olora", "true"]
256+
):
255257
warnings.warn(
256258
"`path_initial_model_for_weight_conversion` only works for converting a PiSSA or OLoRA adapter to a LoRA adapter"
257259
)
@@ -261,7 +263,6 @@ def save_mutated_as_lora(peft_config, path_initial_model_for_weight_conversion,
261263
subfolder=initial_adapter,
262264
adapter_name=initial_adapter,
263265
)
264-
self.peft_config[initial_adapter].init_lora_weights = True
265266
if any(
266267
str(self.peft_config[initial_adapter].init_lora_weights).lower().startswith(prefix)
267268
for prefix in ["pissa", "olora"]

0 commit comments

Comments
 (0)