Skip to content

Fix missing extra_config export for unsupported ignore_layers like mlp.gate#1660

Open
lvliang-intel wants to merge 1 commit intomainfrom
lvl/fix_ignore_layers_export
Open

Fix missing extra_config export for unsupported ignore_layers like mlp.gate#1660
lvliang-intel wants to merge 1 commit intomainfrom
lvl/fix_ignore_layers_export

Conversation

@lvliang-intel
Copy link
Copy Markdown
Contributor

Description

This PR fixes an export gap in set_layer_config() for ignore_layers entries that refer to existing modules which are not supported quantization targets in the current scheme.

Previously, when an ignored module such as mlp.gate existed in the model but was not a supported layer type, its generated FP16 override was removed from layer_config and dropped entirely after validation. As a result, the setting never reached exported regex_config / extra_config, which could cause downstream loaders to miss the intended FP16 override.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please specify):

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.

…p.gate

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Copilot AI review requested due to automatic review settings April 4, 2026 14:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_layers patterns and preserve unsupported leaf-module ignore entries by moving them into regex_config instead of dropping them.
  • Add a CPU unit test that reproduces the unsupported mlp.gate ignore case and asserts the override is retained in regex_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.

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.

2 participants