-
Notifications
You must be signed in to change notification settings - Fork 53
Keep the training data continuous and the total batch size constant regardless of changes in the replica world size. #292
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
base: main
Are you sure you want to change the base?
Conversation
…egardless of changes in the replica world size.
9ff17b1 to
1f5f0ec
Compare
|
In fsdp2 experiment, I found |
|
@zhengchenyu this is super cool! I'll take a deeper look when I'm back on Monday |
| loss.backward() | ||
| total_loss += loss.item() | ||
|
|
||
| if accumulation_steps > 1: |
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.
TODO: use loss * (1 / accumulation_steps)?



The current
train_ddp.pyhas two problems:The following modifications were made:
SkipDistributedSampleris provided to ensure that training can resume from any offset.train_ddp2.py.