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

[Torch][WeightCompression] Add Scale Estimation data-aware support #3179

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

Conversation

kshpv
Copy link
Collaborator

@kshpv kshpv commented Jan 8, 2025

Changes

Add data-aware support for Torch backend for WeightCompression with Scale Estimatiaon support

Reason for changes

Add support of Torch

Related tickets

158974

Tests

Add unittest
Add usecases for Torch to WeightCompression job

@kshpv kshpv requested a review from a team as a code owner January 8, 2025 09:53
@github-actions github-actions bot added NNCF PT Pull requests that updates NNCF PyTorch NNCF Common Pull request that updates NNCF Common experimental NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF PTQ Pull requests that updates NNCF PTQ labels Jan 8, 2025
@kshpv kshpv changed the title [TorchScale est torch [Torch][WeightCompression] Add Scale Estimation support Jan 8, 2025
@kshpv kshpv marked this pull request as draft January 8, 2025 09:54
Comment on lines 575 to 576

@pytest.mark.parametrize("axes", [None, (0,), (0, 1), (0, 1, 2)])
Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov Jan 8, 2025

Choose a reason for hiding this comment

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

Comments regarding the test_reducers_and_aggregators:

  1. Please join this three tests to one
  2. Please use reference inputs/outputs for the reducers as it done in all other tests (instead of a random input and reference numpy implementation)
  3. Please move the joined test above the aggregators tests

@MaximProshin MaximProshin changed the title [Torch][WeightCompression] Add Scale Estimation support [Torch][WeightCompression] Add Scale Estimation data-aware support Jan 8, 2025
@kshpv
Copy link
Collaborator Author

kshpv commented Jan 8, 2025

weight compression build - 291

@kshpv
Copy link
Collaborator Author

kshpv commented Jan 8, 2025

The proposed example can be added as a follow-up PR - will be excluded from this PR

Comment on lines +241 to +243
[None, np.array([[[1, 2, 0], [1, -3, 10]], [[-1, 2, -3], [4, 5, -6]]]), 16.1666],
[(0,), np.array([[[1, 2, 0], [1, -3, 10]], [[-1, 2, -3], [4, 5, -6]]]), 14.25],
[(0, 1), np.array([[[1, 2, 0], [1, -3, 10]], [[-1, 2, -3], [4, 5, -6]]]), 15.875],
Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov Jan 8, 2025

Choose a reason for hiding this comment

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

As each ref input is equal to each other, I believe we can create a global var like DEFAULT_VARIANCE_REF_INPUT for it😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental NNCF Common Pull request that updates NNCF Common NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF PT Pull requests that updates NNCF PyTorch NNCF PTQ Pull requests that updates NNCF PTQ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants