feat(mopd): add cross-tokenizer teacher scoring - #4159
Draft
avenkateshha wants to merge 4 commits into
Draft
avenkateshha wants to merge 4 commits into
avenkateshha wants to merge 4 commits into
Conversation
Signed-off-by: Adithya Hanasoge <avenkateshha@nvidia.com>
Signed-off-by: Adithya Hanasoge <avenkateshha@nvidia.com>
Signed-off-by: Adithya Hanasoge <avenkateshha@nvidia.com>
Contributor
Author
|
/ok to test 71cad59 |
Signed-off-by: Adithya Hanasoge <avenkateshha@nvidia.com>
Contributor
Author
|
/ok to test 6d95861 |
Contributor
Author
|
CI update for |
This branch has not been deployed
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.
What does this PR do?
Adds cross-tokenizer MOPD teacher scoring on top of #3286's offset aligner.
Important
This is a true stacked draft PR. Its base is
avenkateshha/xtoken-offset-alignmentatca3366fc5cf99add7cc4c2002346946f83a5ee85; the diff contains only MOPD work. After #3286 merges, this same branch/PR will be rebased and retargeted to refreshedmain.The implementation:
NemoGymRolloutResult.final_batchcollector contract and stores both projected scores and a boolean validity mask in replay;PR #4045 remains an integration/sequencing constraint only. This PR does not cherry-pick or manage it, and preserves its same-token/full-vocabulary stable-index behavior for a later rebase if needed.
Issues
Depends on #3286.
Usage
Replace the public placeholders in:
Then launch through the existing NeMo Gym GRPO entrypoint. Cross-tokenizer MOPD intentionally rejects Single-Controller, full-vocabulary, and multimodal combinations in this first version.
Validation
Tested through
6d95861649d4d58ad5a6dbc889d5b7ac2a771e6d:NemoGymRolloutResult.final_batchsuccess/fail-closed cases.NATIVE_MULTIMODAL_KEYSimport, reproduced on the stack base.TEST_DRYRUN=1.718 files already formatted).rollout_manager.pyimports missingNATIVE_MULTIMODAL_KEYSfrommultimodal_utils.Internal CPU differential parity used all 192 corrected private records without committing any record, prompt, or tool trace. Runtime Fastokens plus separate plain-HF alignment tokenizers produced 192/192 exact transcript/teacher IDs, offset shapes, #3286-vs-
16e4ccalignment coordinates, pairs/correctness, template masks, final validity masks, and recorded-logprob projections at1e-6tolerance (maximum absolute/relative projection error0).Pending explicit command/allocation approval: BF16 teacher-forward parity, frozen replay advantage/loss parity, GPU teacher smoke plus checkpoint/resume, and the three seed-42 multi-node curve runs. No costly GPU or multi-node job was launched.
Before this PR is ready for review
Additional information
16e4cc719ef200c591eb73b1d2422b41791ac56e.ca3366fc5cf99add7cc4c2002346946f83a5ee85(open, non-draft, mergeable but blocked).main:1bded4304c48410a39e49d10cacfca1a2f3aaacd.7db9f0d188da66f96bb0de903d441a151db3e79e(open, non-draft, mergeable but blocked).