-
Notifications
You must be signed in to change notification settings - Fork 683
Enable loss parallel, Ungate FP8 #2782
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
Merged
felipemello1
merged 31 commits into
meta-pytorch:main
from
nathan-az:enable_loss_parallel
Jun 24, 2025
Merged
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
8aa66d9
Add loss parallel to ParallelDims, and train context manager
nazrak-atlassian f9315dd
Add loss parallel support to LinearCrossEntropyLoss
nazrak-atlassian fd7872c
ungate fp8, clean up llama3 parallelism, add loss parallel to TP plans
nazrak-atlassian f0a40fa
Add loss parallel support to full finetune recipe
nazrak-atlassian 6e93e83
allow enabling autograd compile even though it doesn't work
nazrak-atlassian 566142a
correct import paths in unit tests
nazrak-atlassian b3ae7c4
Merge branch 'pytorch:main' into enable_loss_parallel
nathan-az defc48f
remove autograd compile for now
nathan-az 6eb0d85
Remove unnecessary `full_tensor` in LinearCrossEntropyLoss
nathan-az ae4e751
remove layerwise prefix in llama3 tp plans
nathan-az c4abec6
Refactor tp plans to support fp8 training via arg
nathan-az f037fab
Refactor loss parallel into custom loss classes
nathan-az ed61113
Fix Replicate caused by `tensor_split` in Linear CE, disallow masking…
nathan-az 5875292
re-introduce masking in tensor parallel linear CE loss.
nathan-az bba42d5
revert accidental num_tokens metric in recipe.
nathan-az 87d5fd6
clean up linear CE loss
nathan-az f5efb0f
explicitly flatten target and hidden chunks
nathan-az 40df86d
refactor to allow compile in non-parallel case
nathan-az c0df2b2
comment clarity
nathan-az def5ed4
reshape + mask before chunking, allow toggling masking in loss
nathan-az ef60191
clean up comments
nathan-az 65c1d3a
Clean up docstrings
nathan-az 8294215
simplify SFTLoss contract
nazrak-atlassian f3227eb
remove comment
nathan-az f1e3330
cleanup
nathan-az 7ceec03
fix docstrings in loss_types
nathan-az bb58300
remove unused `indices` arg
nathan-az b89260a
make python3.9 happy
nathan-az f4060ac
Fix typehints, remove `__init__` from SFTLoss ABC
nathan-az 2a5714c
rename context parallel ctx manager
nathan-az e275c88
Merge branch 'pytorch:main' into enable_loss_parallel
nathan-az File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.