Repository navigation
Add composable distillation loss hooks - #44
Draft
CharlelieLrt wants to merge 1 commit into
Draft
CharlelieLrt wants to merge 1 commit into
CharlelieLrt wants to merge 1 commit into
Conversation
This was referenced Oct 14, 2026
CharlelieLrt
force-pushed
the
codex/distillation-loss-hooks
branch
2 times, most recently
from
October 16, 2026 02:42
197e356 to
a8e499c
Compare
Signed-off-by: Charlelie Laurent <claurent@nvidia.com>
CharlelieLrt
force-pushed
the
codex/distillation-loss-hooks
branch
from
October 29, 2026 02:23
a8e499c to
a946b0a
Compare
This was referenced Oct 29, 2026
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.
Description
This PR adds optional loss hooks for users who integrate FastGen into an external
training loop. Shared reductions support masking and weighting for sCM, MeanFlow,
DSM, VSD, and adversarial losses. DMD2 and f-distill callers can select a training
phase explicitly. For f-distill, users can save running ratio statistics in
their own checkpoints and choose the process group that combines those statistics:
Existing calls keep their defaults, and the external loop continues to own
optimizers and checkpoints.
TRAINING_INTEGRATION.mddescribes the maskingcontracts and extension points. PhysicsNeMo can then delegate shared loss math
to FastGen instead of maintaining private compatibility reductions.
Dependencies
Depends on
mainand has no prerequisite PR.Depends on this PR
Independent PhysicsNeMo stack
Independent packaging proposal
If FastGen maintainers decline FastGen #44, we would close PhysicsNeMo #2205.
The preceding PhysicsNeMo stack would remain available.
Review process
Reviewers can compare this PR with its immediate parent. After a parent merges,
we update the remaining branches and their PR bases to keep each diff focused.