Skip to content

Commit e4b374a

Browse files
authored
Disable Qwen3OmniMoe class registration
Comment out import and registration of Qwen3OmniMoe classes. Signed-off-by: Chenjie Luo <108829653+cjluo-nv@users.noreply.github.com>
1 parent c5f2fce commit e4b374a

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

modelopt/torch/quantization/plugins/huggingface.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -576,22 +576,23 @@ def top_k(self, value):
576576
except ImportError:
577577
pass
578578

579-
try:
580-
from transformers.models.qwen3_omni_moe.modeling_qwen3_omni_moe import (
581-
Qwen3OmniMoeTalkerTextSparseMoeBlock,
582-
Qwen3OmniMoeThinkerTextSparseMoeBlock,
583-
)
584-
585-
if Qwen3OmniMoeTalkerTextSparseMoeBlock not in QuantModuleRegistry:
586-
QuantModuleRegistry.register(
587-
{Qwen3OmniMoeTalkerTextSparseMoeBlock: "hf.Qwen3OmniMoeTalkerTextSparseMoeBlock"}
588-
)(_QuantSparseMoe)
589-
if Qwen3OmniMoeThinkerTextSparseMoeBlock not in QuantModuleRegistry:
590-
QuantModuleRegistry.register(
591-
{Qwen3OmniMoeThinkerTextSparseMoeBlock: "hf.Qwen3OmniMoeThinkerTextSparseMoeBlock"}
592-
)(_QuantSparseMoe)
593-
except ImportError:
594-
pass
579+
# Uncomment to forward tokens to all MoE experts for full calibration.
580+
# try:
581+
# from transformers.models.qwen3_omni_moe.modeling_qwen3_omni_moe import (
582+
# Qwen3OmniMoeTalkerTextSparseMoeBlock,
583+
# Qwen3OmniMoeThinkerTextSparseMoeBlock,
584+
# )
585+
586+
# if Qwen3OmniMoeTalkerTextSparseMoeBlock not in QuantModuleRegistry:
587+
# QuantModuleRegistry.register(
588+
# {Qwen3OmniMoeTalkerTextSparseMoeBlock: "hf.Qwen3OmniMoeTalkerTextSparseMoeBlock"}
589+
# )(_QuantSparseMoe)
590+
# if Qwen3OmniMoeThinkerTextSparseMoeBlock not in QuantModuleRegistry:
591+
# QuantModuleRegistry.register(
592+
# {Qwen3OmniMoeThinkerTextSparseMoeBlock: "hf.Qwen3OmniMoeThinkerTextSparseMoeBlock"}
593+
# )(_QuantSparseMoe)
594+
# except ImportError:
595+
# pass
595596

596597

597598
class _QuantGptOssExperts(_QuantFunctionalMixin):

0 commit comments

Comments
 (0)