Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes known FSDP2 strategy issues by updating distributed configuration settings, refining checkpoint scheduling, and updating dataset loading parameters. Key changes include:
- Adding new distributed configuration options (dp_size, tp_size, cp_size, sequence_parallel) and dataset parameter (num_samples_limit) in the YAML recipe.
- Updating checkpoint scheduling logic to skip checkpointing on step 0.
- Refactoring FSDP2 manager imports and type annotations, and adding a trust_remote_code parameter to the HellaSwag dataset.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| recipes/llama_3_2_1b_hellaswag.yaml | Updated distributed and dataset configurations to support FSDP2 fixes. |
| automodel/training/step_scheduler.py | Modified checkpoint condition to avoid triggering on step 0. |
| automodel/training/base_recipe.py | Added directory creation for checkpoint saving. |
| automodel/distributed/parallelizer.py | Removed safe_import_from wrappers in favor of direct imports. |
| automodel/distributed/fsdp2.py | Updated type annotations and default tensor parallel sharding plan. |
| automodel/datasets/utils.py | Minor punctuation fixes in comments. |
| automodel/datasets/llm/hellaswag.py | Updated dataset initialization to include trust_remote_code. |
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
07e47d1 to
a43ebde
Compare
akoumpa
approved these changes
May 29, 2025
Contributor
akoumpa
left a comment
There was a problem hiding this comment.
Thanks a lot @BoxiangW ,
I fixed one minor issue with the linter and DCO'd.
One thing we may want to do in the future is have a function provide the default TP-plan/s, but I think for now this is mergable and we should proceed -- a future note for us to add in upcoming PRs.
Thank you.
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.
No description provided.