Fix missing extra_config export for unsupported ignore_layers like mlp.gate#1660
Open
lvliang-intel wants to merge 1 commit intomainfrom
Open
Fix missing extra_config export for unsupported ignore_layers like mlp.gate#1660lvliang-intel wants to merge 1 commit intomainfrom
mlp.gate#1660lvliang-intel wants to merge 1 commit intomainfrom
Conversation
…p.gate Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an export gap where ignore_layers entries that point to real-but-unsupported (non-quantizable) leaf modules were previously dropped during validation, preventing the intended FP16 override from reaching exported regex_config / extra_config.
Changes:
- Track
ignore_layerspatterns and preserve unsupported leaf-module ignore entries by moving them intoregex_configinstead of dropping them. - Add a CPU unit test that reproduces the unsupported
mlp.gateignore case and asserts the override is retained inregex_config.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
auto_round/compressors/utils.py |
Preserves unsupported ignored leaf modules for export by routing them to regex_config. |
test/test_cpu/utils/test_set_layer_config.py |
Adds regression test covering unsupported ignore_layers retention in regex_config. |
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
This PR fixes an export gap in
set_layer_config()forignore_layersentries that refer to existing modules which are not supported quantization targets in the current scheme.Previously, when an ignored module such as
mlp.gateexisted in the model but was not a supported layer type, its generated FP16 override was removed fromlayer_configand dropped entirely after validation. As a result, the setting never reached exportedregex_config/extra_config, which could cause downstream loaders to miss the intended FP16 override.Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting