-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Merge dsv3 tainer part #2487
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
Draft
hushenwei2000
wants to merge
5
commits into
PaddlePaddle:develop
Choose a base branch
from
hushenwei2000:merge_dsv3
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Merge dsv3 tainer part #2487
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f789ca3
feat(dsv3): trainer part migration
hushenwei2000 d57a21b
feat(dsv3): download support bos
hushenwei2000 626ef5a
Merge branch 'develop' into merge_dsv3
hushenwei2000 11318b9
feat(dsv3): download support bos
hushenwei2000 6a72aed
feat(dsv3): fix code
hushenwei2000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
from paddle.distributed import fleet | ||
|
||
from ..utils.env import PREFIX_CHECKPOINT_DIR | ||
from ..utils.fault_tolerance import is_ft_env | ||
from ..utils.log import logger | ||
from ..utils.pdc_sdk import FLASH_DEVICE | ||
from .trainer_utils import ( | ||
|
@@ -1397,12 +1398,7 @@ def is_segment_parallel_supported(): | |
else: | ||
order = ["dp", "sharding", "pp", "mp"] | ||
if self.use_expert_parallel: | ||
if self.moe_sharding_parallel_degree >= 1 and self.expert_parallel_degree > 1: | ||
order.insert(-1, "ep") | ||
sd_idx = order.index("sharding") | ||
# if pp_first, the order = ["dp", "pp", "moe_sharding", "sharding", "sep", "ep", "mp"] | ||
# if sharding_first, the order is ["dp", "moe_sharding", "sharding", "pp", "sep", "ep", "mp"] | ||
order.insert(sd_idx, "moe_sharding") | ||
order = order[1:-1] + ["dp", "mp"] | ||
|
||
if is_segment_parallel_supported(): | ||
hybrid_configs = { | ||
|
@@ -1556,6 +1552,9 @@ def is_segment_parallel_supported(): | |
fleet.init(is_collective=True, strategy=strategy) | ||
logger.info(strategy) | ||
|
||
if self.expert_parallel_degree > 1: | ||
self.add_moe_comm_group() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 删掉的话会报错
|
||
|
||
elif self.enable_auto_parallel: | ||
self.tensor_parallel_degree = max(self.tensor_parallel_degree, 1) | ||
self.sep_parallel_degree = max(self.sep_parallel_degree, 1) | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么要删除,删除之后会不会对原来逻辑有影响
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不修改的话会报错