Skip to content

Commit 31084d0

Browse files
Allow data-free compression with 3D weights (#3755)
### Changes Update the condition introduced in #3706 to allow data-free compression with 3D weights. ### Reason for changes Only data-aware compression is not possible. Caught with optimum-intel tests https://github.com/huggingface/optimum-intel/actions/runs/19623687915/job/56188570802.
1 parent 19aa034 commit 31084d0

File tree

1 file changed

+8
-3
lines changed
  • src/nncf/quantization/algorithms/weight_compression

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -869,12 +869,17 @@ def get_weight_compression_parameters(
869869
and ov_version
870870
and version.parse(ov_version) <= version.parse("2026")
871871
and node.metatype in self._backend_entity.matmul_metatypes
872+
and (
873+
self._data_aware_compression
874+
or self._awq
875+
or self._sensitivity_metric == SensitivityMetric.HESSIAN_INPUT_ACTIVATION
876+
)
872877
):
873878
# MoE operations are usually matmuls, so the check for matmul metatype is done
874879
# This is to avoid raising the error for non-MoE cases with 3D weights.
875-
msg = f"""NNCF does not support 3D weights with current version of Openvino {ov_version}
876-
due to a known issue in statistics collection Ticket - 176465
877-
Node with weight: {node.node_name}"""
880+
msg = f"""NNCF compression algorithms do not support 3D weights with current version of
881+
Openvino {ov_version} due to a known issue in statistics collection Ticket - 176465.
882+
Node with weight: {node.node_name}."""
878883
raise nncf.UnsupportedModelError(msg)
879884

880885
if self._backup_mode != BackupMode.NONE:

0 commit comments

Comments
 (0)