Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions paddlenlp/peft/lora/lora_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ def forward(self, x: paddle.Tensor):

if not self.merged:
input_mp = self.lora_dropout(input_mp)
if MC2RowSeqParallelCoreLinear is None:
# TODO(@gexiao): temporary workaround for deterministic calculation
if True or MC2RowSeqParallelCoreLinear is None:
input_mp = input_mp @ self.lora_A
input_mp = ReduceScatterOp.apply(input_mp)
else:
Expand Down Expand Up @@ -651,7 +652,8 @@ def forward(self, x: paddle.Tensor):

if not self.merged:
input_a = self.lora_dropout(x) @ self.lora_A
if MC2ColumnSeqParallelCoreLinear is None:
# TODO(@gexiao): temporary workaround for deterministic calculation
if True or MC2ColumnSeqParallelCoreLinear is None:
input_a = AllGatherOp.apply(input_a)
delta_mp = (input_a @ self.lora_B) * self.scaling
else:
Expand Down