nncf icon indicating copy to clipboard operation
nncf copied to clipboard

Support 3D Weights in AWQ Algorithm

Open anzr299 opened this issue 3 months ago • 0 comments

Changes

The core idea of this change is to first unsqueeze the weights so that it becomes 3D. Even the 2D weights. Then the rest of the algorithm implementation is changed such that it expects the weight shape to be 3D. Earlier we traversed each group in a weight individually. But now Since we want to find the scales for per-channel as well as per-expert, we traverse by group index as well as batch/expert index (this is just 1 for 2D weights so the behavior is same as before).

Reason for changes

Support AWQ for models with 3D weights such as MoE models.

Related tickets

175789 & 175212

Tests

Current AWQ tests were extended to include the AWQ test models with 3D weights.

Examples Test - 465 - Pass WC Conformance - 187 - Pass

anzr299 avatar Nov 07 '25 09:11 anzr299