[Bugfix] fix qwen3 moe fp8 accuracy issue (#23031)

Signed-off-by: Jinzhen Lin <jinzhen.ljz@antgroup.com>
This commit is contained in:
Jinzhen Lin 2025-08-17 08:41:23 +08:00 committed by GitHub
parent bf7f470b22
commit a258ad8bcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,6 +125,10 @@ class Fp8Config(QuantizationConfig):
ignored_layers = cls.get_from_keys_or(config, ["ignored_layers"], None)
weight_block_size = cls.get_from_keys_or(config, ["weight_block_size"],
None)
if not ignored_layers:
ignored_layers = cls.get_from_keys_or(config,
["modules_to_not_convert"],
None)
return cls(is_checkpoint_fp8_serialized=is_checkpoint_fp8_serialized,
activation_scheme=activation_scheme,
ignored_layers=ignored_layers,