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.
PR types
New features
PR changes
Others
Describe
Add dygraph sharding stage2
1.Accuracy test
dp2 fp32 - sharding stage2 fp32
dp2 fp32 - sharding stage2 fp16
2.Performance testing
stage2 buffer size=8Mb
0.31B参数 GPT-3 模型
gbs=16,mbs=2:dp(9412 tokens/s) ; stage1(11440 tokens/s) ; stage2(11992 tokens/s)
0.31B参数 GPT-3 模型
gbs=4,mbs=2:dp(9723 tokens/s) ; stage1(10244 tokens/s) ; stage2(10451 tokens/s)
GPT-3 0.31B sharding stage1 fp32
GPT-3 0.31B sharding stage2 fp32
stage1 memory peak:6899 stage2 memory peak:6353 reduced 546Mb Optimization and promotion 8%.