Skip to content

feat: more efficient KD loss with TP#1322

Closed
Separius wants to merge 3 commits intoNVIDIA-NeMo:mainfrom
Separius:patch-2
Closed

feat: more efficient KD loss with TP#1322
Separius wants to merge 3 commits intoNVIDIA-NeMo:mainfrom
Separius:patch-2

Conversation

@Separius
Copy link
Copy Markdown
Contributor

similar to modelopt instead of gathering the logits, we can calculate softmax on each TP with minimal communications

What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

Changelog

  • Add specific line by line info of high level changes in this PR.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?

If you haven't finished some of the above items you can still open "Draft" PR.

Additional Information

  • Related to # (issue)

similar to [modelopt](https://github.com/NVIDIA/Model-Optimizer/blob/9e38041d346d8ee95bc17825ec59f7b91a3e59fc/modelopt/torch/distill/plugins/megatron.py#L292) instead of gathering the logits, we can calculate softmax on each TP with minimal communications
@akoumpa
Copy link
Copy Markdown
Contributor

akoumpa commented Mar 3, 2026

Thanks a lot @Separius , sorry for the delay, unfortunately, i see some unit tests fail, can you take a look? Thank you.

@akoumpa
Copy link
Copy Markdown
Contributor

akoumpa commented Mar 3, 2026

/ok to test 4ec05cf

@akoumpa
Copy link
Copy Markdown
Contributor

akoumpa commented Mar 4, 2026

/ok to test 3fa0a80

@Separius
Copy link
Copy Markdown
Contributor Author

Separius commented Mar 9, 2026

resubmitted in #1499

@Separius Separius closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants