Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAM callback step/epoch skipping configuration #284

Merged
merged 15 commits into from
Sep 9, 2024

Conversation

laserkelvin
Copy link
Collaborator

This PR refactors SAM to allow the ability to specify a number of steps or epochs to delay sharpness awareness by adding the skip_step_count and skip_epoch_count parameters to the SAM.__init__. The former accepts integers, which specifies the minimum number of steps to pass before SAM activates, while the latter accepts both integers and a fraction between [0,1].

Additionally, a configurable logger has been added to SAM, which informs the user when the gradient norm goes below machine epsilon, i.e. indicating numerical instability. Logging is not on by default.

@laserkelvin laserkelvin added ux User experience, quality of life changes training Issues related to model training labels Sep 9, 2024
@smiret-intel smiret-intel merged commit 41a7aac into IntelLabs:main Sep 9, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Issues related to model training ux User experience, quality of life changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants