Skip to content

Add an option to dynamically disable configurable quantizers, separate configuration api for activation and weights quantizers#1438

Merged
irenaby merged 4 commits intomainfrom
conf_quantizers
May 12, 2025
Merged

Add an option to dynamically disable configurable quantizers, separate configuration api for activation and weights quantizers#1438
irenaby merged 4 commits intomainfrom
conf_quantizers

Conversation

@irenaby
Copy link
Copy Markdown
Contributor

@irenaby irenaby commented May 7, 2025

Pull Request Description:

  • When setting bitwidth to configurable quantizer, None can now be passed to disable quantization.
  • Setting bitwidth api was split to separate apis for activation and weights
  • Remove SensotivityEvaluation factory from fw_impl, keep only the relevant quant classes.

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).

@irenaby irenaby requested a review from ofirgo May 7, 2025 06:55
@irenaby irenaby force-pushed the conf_quantizers branch from 3752d88 to c23a0eb Compare May 7, 2025 06:57
@ofirgo ofirgo requested review from reuvenperetz and removed request for ofirgo May 7, 2025 07:36
Quantized activation tensor.
"""
if self.active_quantization_config_index is None:
return inputs.numpy()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this supposed to be numpy? Why not tf tensor?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the actual quantization methods use numpy. But I just complied with the existing interface, it's even has numpy as a return type hint.

@irenaby irenaby merged commit 77e3d11 into main May 12, 2025
31 checks passed
@ofirgo ofirgo deleted the conf_quantizers branch July 2, 2025 12:56
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.

2 participants