Skip to content
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

Polish sequence parallel to improve performance #861

Merged
merged 3 commits into from
Nov 1, 2022

Conversation

sneaxiy
Copy link
Collaborator

@sneaxiy sneaxiy commented Nov 1, 2022

Modification includes:

  • Replace paddle.split with paddle.slice in the scatter method in sequence_parallel_utils.py.
  • Remove the transpose operator in the last TransformerBlock output, and add transpose operator to masked_lm_labels and loss_mask. This would decrease the computation cost.

@sneaxiy sneaxiy changed the title [WIP] polish sequence parallel Polish sequence parallel to improve performance Nov 1, 2022
Copy link
Contributor

@haohongxiang haohongxiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@haohongxiang haohongxiang merged commit cb2b926 into PaddlePaddle:develop Nov 1, 2022
@sneaxiy sneaxiy deleted the polish_sequence_parallel branch November 1, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants