Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

Fix CI test FP8 static backend matching failure (#1589)

Liang Lv6bfe88fba950
diff --git a/auto_round/schemes.py b/auto_round/schemes.py
index 2480e859e..49fc6fa76 100644
--- a/auto_round/schemes.py
+++ b/auto_round/schemes.py
@@ -86,7 +86,14 @@ class QuantizationScheme:
for field in self.get_attributes():
if skip_act_check and field.startswith("act_"):
continue
- if getattr(self, field) != getattr(other, field):
+ self_val = getattr(self, field)
+ other_val = getattr(other, field)
+ # Treat None and empty dict as equivalent for dict fields like transform_config
+ if self_val != other_val:
+ if isinstance(self_val, dict) and not self_val and other_val is None:
+ continue
+ if isinstance(other_val, dict) and not other_val and self_val is None:
+ continue
return False
return True