-
Notifications
You must be signed in to change notification settings - Fork 33
[SP] make eval work #259
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
Merged
[SP] make eval work #259
Conversation
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
Signed-off-by: Stas Bekman <[email protected]>
sfc-gh-truwase
added a commit
to deepspeedai/DeepSpeed
that referenced
this pull request
Aug 11, 2025
Adding inference support for `TiledFusedLogitsLoss` by skipping `backward` inside `forward` if the incoming tensor doesn't require grad. xref: snowflakedb/ArcticTraining#259 --------- Signed-off-by: Stas Bekman <[email protected]> Co-authored-by: Rui Yan <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]>
LYMDLUT
pushed a commit
to LYMDLUT/DeepSpeed
that referenced
this pull request
Aug 20, 2025
Adding inference support for `TiledFusedLogitsLoss` by skipping `backward` inside `forward` if the incoming tensor doesn't require grad. xref: snowflakedb/ArcticTraining#259 --------- Signed-off-by: Stas Bekman <[email protected]> Co-authored-by: Rui Yan <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]> Signed-off-by: lym <[email protected]>
Signed-off-by: Stas Bekman <[email protected]>
Collaborator
Author
|
Important: Before merging wait for a new ds release and add this requirement |
Signed-off-by: Stas Bekman <[email protected]>
sfc-gh-mwyatt
approved these changes
Aug 20, 2025
Collaborator
Author
|
Thank you for reviewing, Mike! |
Signed-off-by: Stas Bekman <[email protected]>
mauryaavinash95
pushed a commit
to DataStates/DeepSpeed
that referenced
this pull request
Oct 4, 2025
Adding inference support for `TiledFusedLogitsLoss` by skipping `backward` inside `forward` if the incoming tensor doesn't require grad. xref: snowflakedb/ArcticTraining#259 --------- Signed-off-by: Stas Bekman <[email protected]> Co-authored-by: Rui Yan <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]>
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.
The PR that added eval support didn't include SP, so this PR adds it.
It seems that liger-kernel
LigerFusedLinearCrossEntropyFunctionreturnsloss=NaNwith eval.I don't see any special code that checks if the function is called in inference mode here
https://github.com/linkedin/Liger-Kernel/blob/65c0ad123e5905208ff11332ba50498308e047bb/src/liger_kernel/ops/fused_linear_cross_entropy.py#L16
unless I'm missing something it always runs backward
So I'm not sure if we need to disable
LigerFusedLinearCrossEntropyFunctionfor eval-mode.But since we have a fallback to our
TiledFusedLogitsLossI made it inference-friendly here: deepspeedai/DeepSpeed#7477So to use this PR you need to also use the above deepspeed PR and remove
model.type:ligerin the configFor Liger-Kernel I opened a detailed issue here #266 - might need to investigate more.
This PR also
testing_utils.py.execute_subprocess_asyncwork with py-3.12./0error thanks to @yanrui27)Fixes: #258