Skip to content

Node weights and node weights attr quantization configs clean-up - remove temporary patch for fields from QuantizationConfig#1486

Merged
irenaby merged 6 commits intomainfrom
wcfg_cleanup
Jul 6, 2025
Merged

Node weights and node weights attr quantization configs clean-up - remove temporary patch for fields from QuantizationConfig#1486
irenaby merged 6 commits intomainfrom
wcfg_cleanup

Conversation

@irenaby
Copy link
Copy Markdown
Contributor

@irenaby irenaby commented Jul 1, 2025

Pull Request Description:

Breaking change: removed min_threshold from QuantizationConfig.
Remove the temporary patch that injected fields previously read from QuantizationConfig back into NodeWeightsQuantizationConfig and WeightsAttrQuantizationConfig.
Pass QuantizationConfig or its relevant field(s) instead of getting it from the node.
Second moment correction: for now keep weights_second_moment_correction flag in NodeWeightsQuantizationConfig, as it is used to mark the nodes for which to apply the correction and remove the reconstructed BN, but instead of reading from QuantizationConfig, set it in BN reconstruction substitution.
Bias correction: remove weights_bias_correction flag from NodeWeightsQuantizationConfig. bias_corrected field is still injected into the config, use it instead to determine whether bias correction should be applied.

Checklist before requesting a review:

  • I set the appropriate labels on the pull request.
  • I have added/updated the release note draft (if necessary).
  • I have updated the documentation to reflect my changes (if necessary).
  • All function and files are well documented.
  • All function and classes have type hints.
  • There is a licenses in all file.
  • The function and variable names are informative.
  • I have checked for code duplications.
  • I have added new unittest (if necessary).

Comment thread model_compression_toolkit/core/common/quantization/node_quantization_config.py Outdated
@irenaby irenaby changed the title Wcfg cleanup Node weights and node weights attr quantization configs clean-up - remove temporary patch for fields from QuantizationConfig Jul 6, 2025
@irenaby irenaby marked this pull request as ready for review July 6, 2025 11:27
@irenaby irenaby requested a review from elad-c July 6, 2025 11:27
@irenaby irenaby merged commit 64e3adb into main Jul 6, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants