-
Notifications
You must be signed in to change notification settings - Fork 33.9k
[DeepSpeed] ZeRO Stage 3 #10753
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
[DeepSpeed] ZeRO Stage 3 #10753
Changes from 15 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
55657dc
synced gpus
stas00 05bddda
fix
stas00 a5adf30
fix
stas00 a241298
Merge remote-tracking branch 'origin/master' into ds-zero-3
stas00 08e43f2
need to use t5-small for quality tests
stas00 2cd947b
notes
stas00 a374e57
Merge remote-tracking branch 'origin/master' into ds-zero-3
stas00 d48ad17
complete merge
stas00 ad7605d
fix a disappearing std stream problem
stas00 a7fafbb
start zero3 tests
stas00 b725c96
Merge remote-tracking branch 'origin/master' into ds-zero-3
stas00 f936858
wip
stas00 0a5d872
tune params
stas00 80fbbe7
sorting out the pre-trained model loading
stas00 538a402
reworking generate loop wip
stas00 a3ce950
wip
stas00 050abd6
Merge remote-tracking branch 'origin/master' into ds-zero-3
stas00 0f58b8d
style
stas00 d2f1f70
fix tests
stas00 d585c8c
split the tests
stas00 399b981
refactor tests
stas00 dfe28b3
wip
stas00 2c3564e
parameterized
stas00 46e2368
fix
stas00 8f26f9a
workout the resume from non-ds checkpoint pass + test
stas00 47e3556
cleanup
stas00 1cfec3c
remove no longer needed code
stas00 1cde0d8
Merge remote-tracking branch 'origin/master' into ds-zero-3
stas00 17e0464
split getter/setter functions
stas00 ea44db6
complete the docs
stas00 aa63fc2
suggestions
stas00 1399f59
gpus and their compute capabilities link
stas00 cb0de9d
Apply suggestions from code review
stas00 f34a62b
style
stas00 376fe60
Merge branch 'ds-zero-3' of github.com:stas00/transformers into ds-ze…
stas00 0799eac
remove invalid paramgd
stas00 e365dfe
automatically configure zero3 params that rely on hidden size
stas00 b3137ae
make _get_resized_embeddings zero3-aware
stas00 1708a82
add test exercising resize_token_embeddings()
stas00 6ee8744
add docstring
stas00 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| { | ||
| "fp16": { | ||
| "enabled": true, | ||
| "loss_scale": 0, | ||
| "loss_scale_window": 1000, | ||
| "initial_scale_power": 16, | ||
| "hysteresis": 2, | ||
| "min_loss_scale": 1 | ||
| }, | ||
|
|
||
| "zero_optimization": { | ||
| "stage": 3, | ||
| "cpu_offload": true, | ||
| "cpu_offload_params": true, | ||
| "cpu_offload_use_pin_memory" : true, | ||
| "overlap_comm": true, | ||
| "contiguous_gradients": true, | ||
| "stage3_max_live_parameters": 1e9, | ||
| "stage3_max_reuse_distance": 1e9, | ||
| "stage3_prefetch_bucket_size": 0.94e6, | ||
| "stage3_param_persistence_threshold": 1e4, | ||
| "reduce_bucket_size": 1e6, | ||
| "prefetch_bucket_size": 3e6, | ||
| "sub_group_size": 1e14 | ||
| }, | ||
|
|
||
| "optimizer": { | ||
| "type": "AdamW", | ||
| "params": { | ||
| "lr": 3e-5, | ||
| "betas": [0.8, 0.999], | ||
| "eps": 1e-8, | ||
| "weight_decay": 3e-7 | ||
| } | ||
| }, | ||
|
|
||
| "scheduler": { | ||
| "type": "WarmupLR", | ||
| "params": { | ||
| "warmup_min_lr": 0, | ||
| "warmup_max_lr": 3e-5, | ||
| "warmup_num_steps": 500 | ||
| } | ||
| }, | ||
|
|
||
| "steps_per_print": 2000, | ||
| "wall_clock_breakdown": false | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.