def register_qwen4_mtp_integration(): try: from omlx.utils import model_loading except ImportError: return False if getattr(model_loading, "_qwen4_mtp_compatible_installed", False): return True original = model_loading._is_mtp_compatible def compatible(config, model_type): if model_type == "qwen4_exp": return model_loading._has_mtp_heads(config) return original(config, model_type) model_loading._is_mtp_compatible = compatible model_loading._qwen4_mtp_compatible_installed = True return True