Skip to content

Conversation

@chtruong814
Copy link
Collaborator

What does this PR do ?

Cherrypick calculate_per_token_loss requirement for context parallel (#14065) (#14282) into r2.4.0

Collection: [Note which collection this PR will affect]

Changelog

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this 

GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

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?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

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

Who can review?

Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.

Additional Information

  • Related to # (issue)

cuichenx and others added 2 commits August 10, 2025 07:02
* add cp per token loss check

Signed-off-by: Chen Cui <[email protected]>

* Apply isort and black reformatting

Signed-off-by: cuichenx <[email protected]>

---------

Signed-off-by: Chen Cui <[email protected]>
Signed-off-by: cuichenx <[email protected]>
Co-authored-by: cuichenx <[email protected]>
Signed-off-by: Charlie Truong <[email protected]>
* Add calculate_per_token_loss for CP

Signed-off-by: Boxiang Wang <[email protected]>

* Add check for average_in_collective

Signed-off-by: Boxiang Wang <[email protected]>

* Apply isort and black reformatting

Signed-off-by: BoxiangW <[email protected]>

* Fix CP issue by adding check on trainer.strategy.ddp_config.average_in_collective

Signed-off-by: Boxiang Wang <[email protected]>

* Apply isort and black reformatting

Signed-off-by: BoxiangW <[email protected]>

---------

Signed-off-by: Boxiang Wang <[email protected]>
Signed-off-by: BoxiangW <[email protected]>
Co-authored-by: BoxiangW <[email protected]>
Signed-off-by: Charlie Truong <[email protected]>
@github-actions
Copy link
Contributor

[🤖]: Hi @chtruong814 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

//cc @chtruong814 @ko3n1g @pablo-garay @thomasdhc

Copy link
Collaborator

@BoxiangW BoxiangW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chtruong814 chtruong814 merged commit 23e9a1d into r2.4.0 Aug 13, 2025
401 of 404 checks passed
@chtruong814 chtruong814 deleted the chtruong/cp-cherry-pick branch August 13, 2025 02:47
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.

4 participants