-
Notifications
You must be signed in to change notification settings - Fork 259
Move is_weight_compression_needed
function to common
#3669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
48cd605
to
d1a1ca6
Compare
a390263
to
04cf656
Compare
bea908d
to
bc9ddb8
Compare
def is_weight_compression_needed(self) -> bool: | ||
""" | ||
Determine whether weight compression is needed based on advanced quantization parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the function to the module scope, currently it is a method of advanced parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved
:param COMPRESS_WEIGHTS: A key in the `backend_params` dictionary that indicates whether | ||
weight compression should be applied. If set to False, weight compression is disabled. | ||
By default, weight compression is enabled (True). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param COMPRESS_WEIGHTS: A key in the `backend_params` dictionary that indicates whether | |
weight compression should be applied. If set to False, weight compression is disabled. | |
By default, weight compression is enabled (True). | |
:param compress_weights: Indicates whether | |
weight compression should be applied. If set to False, weight compression is disabled. | |
By default, weight compression is enabled (True). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean, applied
:param COMPRESS_WEIGHTS: A key in the `backend_params` dictionary that indicates whether | ||
weight compression should be applied. If set to False, weight compression is disabled. | ||
By default, weight compression is enabled (True). | ||
:type COMPRESS_WEIGHTS: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:type COMPRESS_WEIGHTS: str | |
:type compress_weights: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
backend_params: dict[str, Any] = field(default_factory=dict) | ||
|
||
# Backend parameter names | ||
COMPRESS_WEIGHTS = "compress_weights" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COMPRESS_WEIGHTS = "compress_weights" | |
compress_weights = True |
Please move this line to the line 272
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
08edc7f
to
ca0d665
Compare
Should be merged after #3662 |
Rebased the changes after merging this PR and applied similar changes for ONNX as well |
Changes
backend_parameters.py
files and move it from Torch FX and OpenVINO backends to the commonadvanced_parameters.py
Related tickets
Closes Issue #3668