You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Torch] Add the GroupedMatMul operation for data-free weight compression - #4241
apply_chat_template returns the token tensor by default when return_dict is not set, even when return_tensors="pt" is requested. Consequently batch_feature is a Tensor here and batch_feature["input_ids"] raises before the example can generate any output. Request a mapping explicitly.
Avoid misquantizing GroupedMatMul in shared matmul paths
Adding this metatype to the shared MATMUL_METATYPES list also makes it a supported matmul for the regular Torch MinMax quantization path (src/nncf/quantization/algorithms/min_max/torch_backend.py:66). That path still calls get_weight_channel_axes, whose fallback returns axis 0 for GroupedMatMul; an untransposed grouped weight has [num_groups, C_IN, C_OUT] layout and will therefore be quantized along the wrong dimension (and the generic path has no grouped-mm offsets handling). Keep this operation out of the shared list and expose a weight-compression-specific list, or add equivalent grouped-mm handling to every consumer of the list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Add the GroupedMatMul operation for data-free weight compression
Reason for changes
Support the GroupedMatMul operation in torch backend
Related tickets
CVS-191922
Tests
test_get_reduction_axes
Test examples - success
Weight compression - success