Adding support for tracking optimizers states in Model Delta Tracker. #3143
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.
Summary:
Overview
This diff adds support for tracking optimizer states in the Model Delta Tracker system. It introduces a new tracking mode called
MOMENTUM_LAST
that enables tracking of momentum values from optimizers to support approximate top-k delta-row selection.Key Changes
1. Optimizer State Tracking Support
optim_state_tracker_fn
attribute toGroupedEmbeddingsLookup
andGroupedPooledEmbeddingsLookup
classes responsible for traversing over the BatchedFused modules.register_optim_state_tracker_fn()
method in both classes to register the trackable callable2. Model Delta Tracker Changes
record_momentum()
method to track momentum values from optimizer states and its support in record_lookup function.MOMENTUM_LAST
mode3. New Tracking Mode
TrackingMode.MOMENTUM_LAST
to**types.py**
EmbdUpdateMode.LAST
to capture the most recent momentum valuesDifferential Revision: D76868111