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

[PTQ][Common] Use inference_nncf_graph instead nncf_graph in get_weights #2862

Conversation

daniil-lyakhov
Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov commented Aug 1, 2024

Changes

Use inference_nncf_graph instead nncf_graph in get_weights

Reason for changes

To avoid quantizing weight nodes that are present in nncf_graph and absent in inference_nncf_graph

Related tickets

#2766

Tests

test_ptq_params: test_constant_branch_weighted_node_quantization is introduced

@daniil-lyakhov daniil-lyakhov requested a review from a team as a code owner August 1, 2024 10:00
@github-actions github-actions bot added the NNCF PTQ Pull requests that updates NNCF PTQ label Aug 1, 2024
@daniil-lyakhov
Copy link
Collaborator Author

Onnx tests diff:
image

@github-actions github-actions bot added NNCF PT Pull requests that updates NNCF PyTorch NNCF OpenVINO Pull requests that updates NNCF OpenVINO NNCF ONNX Pull requests that updates NNCF ONNX labels Aug 1, 2024
@daniil-lyakhov daniil-lyakhov force-pushed the dl/ptq/fix_weights_nodes_collection branch from 11b19f0 to d1de35e Compare August 2, 2024 08:40
@daniil-lyakhov daniil-lyakhov force-pushed the dl/ptq/fix_weights_nodes_collection branch 2 times, most recently from 013bea4 to d8d043e Compare August 2, 2024 08:52
@daniil-lyakhov
Copy link
Collaborator Author

Turns out some operations on constant paths should be quantized (like positional embedding in GPT-2 model), so this fix is invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NNCF ONNX Pull requests that updates NNCF ONNX 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.

1 participant