Skip to content

Conversation

fynnsu
Copy link
Contributor

@fynnsu fynnsu commented Jul 28, 2025

Closes #405

  • expand_target_names -> replaced with match_named_modules
  • is_target -> removed
  • find_name_or_class_matches -> replaced with match_named_modules
  • _find_matches -> removed
  • get_nested_weight_mappings
  • match_param_name

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>
fynnsu added 3 commits July 29, 2025 18:35
Removed `yield_matched_targets` and `warn_on_unmatched_ignores` and updated rest of code

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>
@fynnsu fynnsu marked this pull request as ready for review July 29, 2025 19:48
This function is currently used by llm-compressor so adding it back with a deprecation warning for now. 

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>
Signed-off-by: Fynn Schmitt-Ulms <[email protected]>
Copy link
Contributor

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good! few comments

Copy link
Contributor

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the updates, LGTM!

Copy link
Contributor

@kylesayrs kylesayrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really impressive work, thanks!

Copy link
Contributor

@kylesayrs kylesayrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Copy link
Contributor

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for updating!

@kylesayrs kylesayrs merged commit d99d38b into neuralmagic:main Aug 20, 2025
1 check passed
@fynnsu fynnsu deleted the refactor_utils branch August 20, 2025 16:38
kylesayrs added a commit that referenced this pull request Aug 20, 2025
kylesayrs pushed a commit that referenced this pull request Aug 20, 2025
* Update `apply_quantiation_config` to use `match_named_modules`

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Refactor usages of `expand_target_names`, `is_target`, and `find_name_or_class_matches`


Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Small fixes

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Simplify signature of `match_named_modules`

Removed `yield_matched_targets` and `warn_on_unmatched_ignores` and updated rest of code

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Ensure `match_targets` doesn't return duplicates

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Remove `preprocess_name` parameter from `match_named_modules`

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Update match.py util fn signatures and small fixes

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Restore `find_name_or_class_matches` as a deprecated function

This function is currently used by llm-compressor so adding it back with a deprecation warning for now. 

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Use deprecated decorator instead of manual deprecation warning

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>

* Update syntax of of optional types

* Remove default None target value in match utils

---------

Signed-off-by: Fynn Schmitt-Ulms <[email protected]>
kylesayrs added a commit that referenced this pull request Aug 20, 2025
@fynnsu fynnsu restored the refactor_utils branch August 21, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Help Wanted] Refactor module / parameter matching logic
3 participants