Skip to content
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

py1e randomized #442

Merged
merged 4 commits into from
Sep 21, 2023
Merged

py1e randomized #442

merged 4 commits into from
Sep 21, 2023

Conversation

snarayan21
Copy link
Collaborator

@snarayan21 snarayan21 commented Sep 21, 2023

Description of changes:

Previously, the range of each shard in the py1e shuffle algorithm was not randomized. So when training on a large number of nodes, each node would need to download NCN/PN number of shards at the same time. By randomizing the range of each shard (within 0.75xSBS to 1.25xSBS), we ensure that nodes need to download shards at different times during training. If there is a cluster-level internet bandwidth limit, this PR will help alleviate potential bottlenecks.

In this first image, we see that using the py1br shuffle algorithm can cause throughput drops when node internet bandwidth is very low. However, downloads are relatively balanced across nodes due to randomized shuffle block size.
py1br_SBS50k_CN336_PN48_b3_N50MB

In this next image, we see that using the py1e shuffle algorithm eliminates throughput drops since downloads inside each node are much more balanced. However, overall downloads show a stepwise behavior since all nodes are downloading shards at the same time. This may cause issues with cluster-level internet bandwidth limits and cause unforeseen throughput drops due to this bottleneck.
py1e_SBS50k_CN336_PN49_b3_N50MB

As a result, bringing the randomized shuffle block size from py1br to py1e will ensure that the balanced intra-node downloading of the original py1e is combined with the balanced inter-node downloading of py1br.

Issue #, if available:

Merge Checklist:

Put an x without space in the boxes that apply. If you are unsure about any checklist, please don't hesitate to ask. We are here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the contributor guidelines
  • This is a documentation change or typo fix. If so, skip the rest of this checklist.
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the MosaicML team.
  • I have updated any necessary documentation, including README and API docs (if appropriate).

Tests

  • I ran pre-commit on my change. (check out the pre-commit section of prerequisites)
  • I have added tests that prove my fix is effective or that my feature works (if appropriate).
  • I ran the tests locally to make sure it pass. (check out testing)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes.

@snarayan21 snarayan21 merged commit d5ff35f into mosaicml:main Sep 21, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants