Skip to content
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

Aanuf/data free awq #3315

Draft
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

andreyanufr
Copy link
Collaborator

Changes

Data free AWQ: smooth down_proj input channels and merge extra scale to up_proj output channels.

Reason for changes

@github-actions github-actions bot added the NNCF PTQ Pull requests that updates NNCF PTQ label Feb 26, 2025
@github-actions github-actions bot added the NNCF OpenVINO Pull requests that updates NNCF OpenVINO label Feb 27, 2025
@github-actions github-actions bot added the API Public API-impacting changes label Mar 4, 2025
@andreyanufr andreyanufr requested a review from ljaljushkin March 13, 2025 08:16
w_scale = fns.unsqueeze(scale, 1 - wp.reduction_axes[0])
a_scale = fns.unsqueeze(1.0 / scale, wp.reduction_axes[0])

scaled_weight = weight * w_scale
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rebase from develop, I've made some casting for float16 models

model_transformer = ModelTransformerFactory.create(model, inplace=True)

is_data_free = True #statistics is None
description = "Applying data-free AWQ" if is_data_free else "Applying AWQ"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description = "Applying data-free AWQ" if is_data_free else "Applying AWQ"
description = "Applying data-free AWQ" if is_data_free else "Applying data-aware AWQ"

maybe more clear

@@ -506,7 +506,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:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd redefine

self._data_aware_compression = (self._awq and dataset) or (...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Public API-impacting changes NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants