fix is_permuted (#3098)

Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
This commit is contained in:
Yuan Xiaolan
2025-07-31 19:58:05 +08:00
committed by GitHub
parent 25005fee30
commit 5f56d289a7
3 changed files with 6 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ class MixQuantConfig(QuantConfigBase):
image_moe_quant_type: str = None,
is_channel_wise: bool = False,
has_zero_point: bool = False,
is_permuted: bool = False,
is_permuted: bool = True,
) -> None:
super().__init__()
self.dense_quant_type = dense_quant_type
@@ -65,7 +65,7 @@ class MixQuantConfig(QuantConfigBase):
config.get("image_moe_quant_type", None),
config.get("is_channel_wise", False),
config.get("has_zero_point", False),
config.get("is_permuted", False),
config.get("is_permuted", True),
)
def get_quant_method(self, layer) -> Optional[QuantMethodBase]:
@@ -73,13 +73,13 @@ class MixQuantConfig(QuantConfigBase):
if layer.moe_tag == "Image":
return (
get_quantization_config(self.image_moe_quant_type)
.from_config(layer.fd_config.quant_config)
.from_config({"is_permuted": self.is_permuted})
.get_quant_method(layer)
)
else:
return (
get_quantization_config(self.moe_quant_type)
.from_config(layer.fd_config.quant_config)
.from_config({"is_permuted": self.is_permuted})
.get_quant_method(layer)
)
elif isinstance(layer, Attention):