-
Notifications
You must be signed in to change notification settings - Fork 251
Aanuf/data free awq #3315
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?
Aanuf/data free awq #3315
Changes from all commits
488cacc
ee64877
f22e411
51b4d7b
f66cd1e
7ce5a53
f74d156
5288c79
1becf15
047d7d9
c0c7e57
b74dea1
26a9a77
25fcc2c
f6f4693
19a64ac
bf215d5
566ebe7
70e47c8
6b3310b
c13437f
519727f
10920a2
35f6a64
83c7867
a17b896
516fec7
48e7f1c
57c3e4a
cd9e4c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -302,6 +302,7 @@ def __init__( | |||||||||||
awq_params.alpha_min, | ||||||||||||
awq_params.alpha_max, | ||||||||||||
awq_params.steps, | ||||||||||||
awq_params.prefer_data_aware, | ||||||||||||
) | ||||||||||||
if self._gptq: | ||||||||||||
gptq_params = self._advanced_parameters.gptq_params | ||||||||||||
|
@@ -323,7 +324,12 @@ def __init__( | |||||||||||
self._data_aware_mixed_precision = ( | ||||||||||||
self._sensitivity_metric != SensitivityMetric.WEIGHT_QUANTIZATION_ERROR and self._ratio != 1.0 | ||||||||||||
) | ||||||||||||
self._data_aware_compression = self._awq or self._scale_estimation or self._lora_correction or self._gptq | ||||||||||||
self._data_aware_compression = ( | ||||||||||||
(self._awq and self._advanced_parameters.awq_params.prefer_data_aware) | ||||||||||||
or self._scale_estimation | ||||||||||||
or self._lora_correction | ||||||||||||
or self._gptq | ||||||||||||
) | ||||||||||||
|
||||||||||||
@property | ||||||||||||
def available_backends(self) -> List[BackendType]: | ||||||||||||
|
@@ -542,7 +548,7 @@ def apply( | |||||||||||
nodes_to_compress = self.get_nodes_to_compress(graph) | ||||||||||||
|
||||||||||||
statistics = None | ||||||||||||
if self._data_aware_mixed_precision or self._data_aware_compression: | ||||||||||||
if (self._data_aware_mixed_precision or self._data_aware_compression) and dataset: | ||||||||||||
nikita-savelyevv marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please redefine
Then we can rollback this if statement to the original form.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have to change my original suggestion here 🙂 After the recent changes ( self._data_aware_compression = self._scale_estimation or self._lora_correction or self._gptq Because otherwise it can happen that And then we can do:
Suggested change
|
||||||||||||
matmul_nodes_to_compress = [ | ||||||||||||
node for node in nodes_to_compress if node.metatype in self._backend_entity.matmul_metatypes | ||||||||||||
] | ||||||||||||
|
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.
What do you think about this?