Open
Conversation
dirkgr
requested changes
Feb 4, 2025
| compression_topk=cfg.optimizer.compression_topk, | ||
| compression_chunk=cfg.optimizer.compression_chunk, | ||
| weight_decay=cfg.optimizer.weight_decay, | ||
| process_group=None, # TODO: fix for hybrid sharding |
Member
There was a problem hiding this comment.
This seems important? Hybrid is necessary for big models.
Comment on lines
+537
to
+548
| ### DeMo parameters | ||
| compression_decay: float = 0.999 | ||
|
|
||
| compression_topk: int = 32 | ||
| """ | ||
| How many numbers of topk to transmit per chunk, if dynamic is enabled, this is the initial topk | ||
| """ | ||
|
|
||
| compression_chunk: int = 64 | ||
| """ | ||
| Size of the chunk of the gradients, note that 2D gradients are chunked in 2D, which the topk sparsity is squared compared to 1D | ||
| """ |
Comment on lines
+854
to
+855
| disable_grad_sync: bool = False | ||
|
|
Member
There was a problem hiding this comment.
I see this setting twice, once here, and once in DDPGradSyncMode?
| return metrics | ||
|
|
||
|
|
||
| class DeMo(torch.optim.SGD, Optimizer): |
Member
There was a problem hiding this comment.
It seems like the organization would make more sense if this class, and demo_utils.py, were in their own file together, and then we use __all__ to make this optimizer appear the same as the others.
Member
|
Oh, I see. You put a reference in the description 🙈. Paper says you pushed this to 1B/100B tokens. Can you go further? Experience says, things like this stop working if you go really big. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cleaned-up version of https://github.com/bloc97/DeMo for integrating efficient distributed training a la Decoupled Monentum Optimization (https://arxiv.org/abs/2411.19870)