[Callbacks] Remove MagnitudePruningModifier.leave_enabled#1198
Merged
[Callbacks] Remove MagnitudePruningModifier.leave_enabled#1198
MagnitudePruningModifier.leave_enabled#1198Conversation
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
|
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed. |
MagnitudePruningModifier.leave_enabledMagnitudePruningModifier.leave_enabled
rahul-tuli
approved these changes
Feb 27, 2025
Collaborator
rahul-tuli
left a comment
There was a problem hiding this comment.
Thank you for this change!
brian-dellabetta
approved these changes
Feb 27, 2025
brian-dellabetta
pushed a commit
that referenced
this pull request
Mar 10, 2025
## Purpose ## * Simplify the modifier lifecycle by removing the ability for modifiers to affect the model after the modifier's `end` event * This allows the `on_event` method to be removed in a future change ## Background ## * The `leave_enabled` option was originally intended as a shortcut to simplify recipes which used magnitude pruning during the iterative pruning, then needed the masks to stay enabled during stabilization SFT * This change proposes making the recipe clearer by requiring the ConstantPruningModifier after the MagnitudePruningModifier becomes inactive ## Changes ## * Remove `MagnitudePruningModifier.leave_enabled` with a deprecation warning Signed-off-by: Kyle Sayers <kylesayrs@gmail.com> Signed-off-by: Brian Dellabetta <bdellabe@redhat.com>
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.
Purpose
endeventon_eventmethod to be removed in a future changeBackground
leave_enabledoption was originally intended as a shortcut to simplify recipes which used magnitude pruning during the iterative pruning, then needed the masks to stay enabled during stabilization SFTChanges
MagnitudePruningModifier.leave_enabledwith a deprecation warning