This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
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.
Issue
Training requires flattened models, any MP and FSDP
Inference requires unflattened models with FSDP 1
We wanted AML jobs which train model (which produces Flattened checkpoint output), reshards the checkpoints to Unflatten with FSDP 1 for inference, and evaluates the model outputs
Solution
Testing steps
Did not test although this file was direct from our fork without modification so it likely works as is
Video or Screenshots
Flow Chart of Steps in Script
MPxFSDP (2x8 -> 8x1)
Flattened to Unflattened Output (MP and FSDP unchanged):
Related to #726
Most of work was done by @sahajgg