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

[HybridParallel]Add segment methods for pipelineparallel #53344

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

ForFishes
Copy link
Member

@ForFishes ForFishes commented Apr 25, 2023

PR types

New features

PR changes

Others

Description

[HybridParallel]Add segment methods for pipelineparallel

python code:

class GPT(PipelineLayer):
        self.descs = [.....]
        super().__init__(
            layers=self.descs,
            seg_method=[0, 3, 6],
            })

When the seg_method is a list, it uses left-closed-right-open, indicating that the segmentation is performed according to the method specified by the user. If the total number of layerdesc is 10, and the number of pp segmentation stages is 3, then there is

  1. seg_method=[0, 3, 6]
    Indicates that the segmentation is grouped into
    stage0: 0, 1, 2
    stage1: 3, 4, 5
    stage2: 6, 7, 8, 9

  2. seg_method=[0, 3, 4, 10]
    Indicates that the segmentation is grouped into
    stage0: 0, 1, 2
    stage1: 3
    stage2: 4, 5, 6, 7, 8, 9

@paddle-bot
Copy link

paddle-bot bot commented Apr 25, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot
Copy link

paddle-bot bot commented Apr 25, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

LGTM

@gongweibao gongweibao merged commit c59debe into PaddlePaddle:develop Apr 26, 2023
@ForFishes ForFishes deleted the seg_for_pp branch April 26, 2023 07:21
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