Skip to content

Conversation

@daniil-lyakhov
Copy link
Collaborator

Changes

  • Support of conv transpose_a attribute for ONNX/OpenVINO backends in the Scale Estimation algorithm
  • The static method activations_to_wc_statistics moved from the Scale Estimation algorithm to the GPTQ

Reason for changes

  • To enable Scale Estimation for the models with SMM (pattern has transpose_a in ONNX/OpenVINO)

Related tickets

173277

Tests

tests/cross_fw/test_templates/template_test_weights_compression.py::test_scale_estimation updated with the transpose_a cases

@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 Jan 13, 2026
@daniil-lyakhov daniil-lyakhov marked this pull request as ready for review January 13, 2026 18:45
@daniil-lyakhov daniil-lyakhov requested a review from a team as a code owner January 13, 2026 18:45
act_ch_axis = self._backend_entity.get_activation_channel_axis(
wp.node_with_weight, activation_port_id, act_shape
)
act_ch_axis %= len(act_shape)
Copy link
Collaborator

Choose a reason for hiding this comment

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

For which case it's need?
All tests still pass if remove the line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Outdated


weight = self._backend_entity.get_weight(wp.node_with_weight, weight_port_id, model, graph)

activation_port_id = self._backend_entity.get_activation_port_id(wp.node_with_weight, graph)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like copypast from awq.py.
Please think about to refactor it into a shared function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

WeightCompressionAlgoBackend.get_activation_channel_axis_and_shape is instroduced, please check


matmul = opset.matmul(input_1, weight_data, transpose_a=False, transpose_b=False, name="MoE_MatMul")
if tranpsose_a:
transpose = opset.transpose(input_1, (0, 2, 1))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please check, looks like it never runs

Copy link
Collaborator Author

@daniil-lyakhov daniil-lyakhov Jan 15, 2026

Choose a reason for hiding this comment

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

Good catch,
It is, because of this skip https://github.com/daniil-lyakhov/nncf/blob/dl/sa_transpose_a/tests/openvino/native/quantization/test_weights_compression.py#L2369

I fixed the test and asked @anzr299 to remove the skip. Ticket 179366

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants