Skip to content

Commit 1fde10f

Browse files
committed
fix reduction axes for awq w scale
1 parent bea7346 commit 1fde10f

File tree

1 file changed

+1
-1
lines changed
  • src/nncf/quantization/algorithms/weight_compression

1 file changed

+1
-1
lines changed

src/nncf/quantization/algorithms/weight_compression/awq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def apply(
183183
prev_statistics = statistics[merge_node.node_name]
184184
scale = self._data_aware_step(wp, weight, statistics[k], prev_weight, prev_statistics)
185185

186-
w_scale = fns.unsqueeze(scale, -wp.reduction_axes[0])
186+
w_scale = fns.unsqueeze(scale, -1 - wp.reduction_axes[0])
187187
a_scale = fns.unsqueeze(1.0 / scale, -wp.reduction_axes[0])
188188

189189
scaled_weight = (weight * w_scale).astype(weight_dtype)

0 commit comments

Comments
 (0)