Skip to content

Commit 079f067

Browse files
authored
fix (#7781)
1 parent 17acf22 commit 079f067

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

paddlenlp/peft/lora/lora_model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ def _merge_trainable_tensor_parallel(self, trainable_state_dict):
195195
if key in trainable_name_action_mappings:
196196
ret = distributed_gather(tensor, group=mp_group, offload=True)
197197
action = trainable_name_action_mappings[key]
198-
is_collumn = self.lora_split_mapping[key]
199-
if "_scale" in key and not is_collumn and is_dst:
198+
if key in self.lora_split_mapping and not self.lora_split_mapping[key] and "_scale" in key and is_dst:
200199
ret = paddle.to_tensor(ret)
201200
tensor = paddle.max(ret, axis=0)
202201
else:

0 commit comments

Comments
 (0)