[peft] revert: Validate PEFT target modules (#1747)#3583
Merged
Conversation
This reverts commit 1396c27. The validation broke finetune tests; reverting until a follow-up fix lands. Signed-off-by: Chen Cui <chcui@nvidia.com>
| self._validate_target_matches() | ||
| self._reset_target_match_state() | ||
|
|
||
| self.freeze_model(model, training=training) |
Contributor
There was a problem hiding this comment.
LGTM — clean revert of #1747. The validation removal, canonical_lora.py else-branch restoration, and test adjustments are all consistent.
Contributor
Author
|
/ok to test e9cfe6f |
3 tasks
vasunvidia
pushed a commit
to vasunvidia/Megatron-Bridge
that referenced
this pull request
Jun 10, 2026
…A-NeMo#3583) Signed-off-by: Chen Cui <chcui@nvidia.com> Signed-off-by: Vasudevan Rengasamy <vrengasamy@nvidia.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.
Summary
Reverts #1747 ("feat: Validate PEFT target modules", merge commit
1396c27a67191fb4ddf5e9b97dbaebb12ee82378).The newly added validation in
module_matcher.py/canonical_lora.pyrejects target-module configurations that real finetune recipes rely on, breaking finetune tests onmain. Reverting unblocks finetune; the validation can be re-introduced in a follow-up that accommodates the existing recipe target lists.Files reverted
src/megatron/bridge/peft/base.pysrc/megatron/bridge/peft/canonical_lora.pysrc/megatron/bridge/peft/dora.pysrc/megatron/bridge/peft/module_matcher.pytests/unit_tests/peft/test_canonical_lora.pytests/unit_tests/peft/test_lora.pyTest plan
mainafter feat: Validate PEFT target modules #1747 and confirm they pass with this revert.tests/unit_tests/peft/) still pass against the pre-feat: Validate PEFT target modules #1747 behavior.cc @yaoyu-33