-
Notifications
You must be signed in to change notification settings - Fork 300
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
Skip data loading for middle PP ranks #411
Closed
Closed
Conversation
This file contains 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 was referenced Jun 17, 2024
wconstab
added a commit
that referenced
this pull request
Jun 17, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: b91fe55dcd8bdbbb9a4750c69cf40d2e51eec078 Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 17, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 5698ec46a1fc0dc65592df6813fc31a30470e99b Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 17, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 722bc565c9d56405285b4a5bbfcce9cda7d801a6 Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 17, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 70b41d137c12c858c4605c42faeddcbb6734193e Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 19, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 70b41d137c12c858c4605c42faeddcbb6734193e Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 20, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 0330f308b151aef5d1afbdbee938adfd8cf742b4 Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 20, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 0330f308b151aef5d1afbdbee938adfd8cf742b4 Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 20, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 0330f308b151aef5d1afbdbee938adfd8cf742b4 Pull Request resolved: #411
wconstab
added a commit
that referenced
this pull request
Jun 21, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 443444902b1549fa4b6f9e2c4521490a72fb4ffc Pull Request resolved: #411
honestly i'm not sure if we want to land this PR or not. It is not urgent in any case, and we could do some experiments to decide whether its more critical to reduce data-loader stress or to keep compute/comms balanced per rank and ensure we avoid timeouts. closing for now. |
tianyu-l
pushed a commit
that referenced
this pull request
Aug 16, 2024
First and last PP rank need to perform data loading to fetch matching input_ids and labels. - as an alternative, PP could pass the 'labels' from stage 0 through all the stages, but unless the dataloader is overburdened enough to become the bottleneck this would likely be worse A downside to skipping dataloading for middle ranks is added complexity in train.py including handling metrics. - wps and mfu are derived from knowing the number of words in the batch, which is no longer known if data loading is skipped. This may be OK- last rank is the most interesting one to look at logs from since it also includes loss, and would compute MFU/WPS as well. However, if there are imbalances in WPS between ranks, we'd ideally have a way to see that via the metrics. ghstack-source-id: 443444902b1549fa4b6f9e2c4521490a72fb4ffc Pull Request resolved: #411
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.
Stack from ghstack (oldest at bottom):
First and last PP rank need to perform data loading to fetch matching
input_ids and labels.
all the stages, but unless the dataloader is overburdened enough to
become the bottleneck this would likely be worse
A downside to skipping dataloading for middle ranks is added complexity
in train.py including handling metrics.
which is no longer known if data loading is skipped. This may be OK-
last rank is the most interesting one to look at logs from since it
also includes loss, and would compute MFU/WPS as well. However, if
there are imbalances in WPS between ranks, we'd ideally have a way to
see that via the metrics.