Add coefficient scheduling (warmup + anneal) to importance minimality loss#439
Open
Add coefficient scheduling (warmup + anneal) to importance minimality loss#439
Conversation
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
Add coefficient scheduling to the importance minimality loss. Four new config fields on
ImportanceMinimalityLossConfig:coeff_peak_multiplier— multiplier applied to the loss coeff at the peakcoeff_anneal_start_frac/coeff_anneal_end_frac— linearly anneal the multiplier back to 1.0coeff_warmup_frac— linearly ramp the loss coefficient from 0 to the peak value (coeff*coeff_peak_multiplier) over this fraction of trainingAlso adds a config validator ensuring scheduling fractions are ordered correctly (including for the existing
p_anneal_*fields), and moves thep_annealordering assertion from the loss function into the validator for consistency.Related Issue
NA
Motivation and Context
Allows experimenting with non-constant importance minimality loss weighting — e.g. starting with a stronger sparsity pressure and relaxing it, or warming up the loss gradually.
How Has This Been Tested?
Tested on a pile_llama transformer and on the resid_mlp2 toy model.
Does this PR introduce a breaking change?
No. The default values for all new fields preserve existing behavior.