Skip to content

[LLM] disable part of MC2 in lora #8505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2024
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 @@

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:

Check warning on line 413 in paddlenlp/peft/lora/lora_layers.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/peft/lora/lora_layers.py#L413

Added line #L413 was not covered by tests
input_mp = input_mp @ self.lora_A
input_mp = ReduceScatterOp.apply(input_mp)
else:
Expand Down Expand Up @@ -651,7 +652,8 @@

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:

Check warning on line 656 in paddlenlp/peft/lora/lora_layers.py

View check run for this annotation

Codecov / codecov/patch

paddlenlp/peft/lora/lora_layers.py#L656

Added line #L656 was not covered by tests
input_a = AllGatherOp.apply(input_a)
delta_mp = (input_a @ self.lora_B) * self.scaling
else:
Expand Down
Loading