hiyouga/LlamaFactory · error · ValueError

Model {model_type} is not supported by mcore_adapter.You can

Error message

Model {model_type} is not supported by mcore_adapter.You can try to upgrade mcore_adapter to the latest version for more supported models.

What it means

Error "Model {model_type} is not supported by mcore_adapter.You can try to upgrade mcore_adapter to the latest version for more supported models." thrown in hiyouga/LlamaFactory.

Source

Thrown at src/llamafactory/train/mca/workflow.py:106

        return tmp_features

    return wrapper


def _check_model_support(model_args: "ModelArguments"):
    from transformers import AutoConfig as HfAutoConfig

    if os.path.exists(os.path.join(model_args.model_name_or_path, "mca_config.json")):  # load from mcore ckpt
        mca_config = json.load(open(os.path.join(model_args.model_name_or_path, "mca_config.json")))
        model_type = mca_config.get("hf_model_type", None)
    else:
        config = HfAutoConfig.from_pretrained(
            model_args.model_name_or_path, trust_remote_code=model_args.trust_remote_code
        )
        model_type = config.model_type

    if model_type not in MCA_SUPPORTED_MODELS:
        raise ValueError(
            f"Model {model_type} is not supported by mcore_adapter."
            "You can try to upgrade mcore_adapter to the latest version for more supported models."
        )


def _freeze_model_parameters(model: Any, finetuning_args: "FinetuningArguments"):
    """Freeze model parameters for qwen_vl series models based on finetuning arguments."""
    if getattr(model.config, "hf_model_type", None) not in [
        "qwen2_vl",
        "qwen2_5_vl",
        "qwen3_vl",
        "qwen3_vl_moe",
        "qwen3_5",
        "qwen3_5_moe",
    ]:
        return

    params_to_freeze = []

View on GitHub (pinned to f28afaf635)

Solutions

  1. Upgrade mcore_adapter to the latest version: pip install -U mcore-adapter.
  2. If the model is still unsupported, use a model type listed in MCA_SUPPORTED_MODELS or run without USE_MCA=1.

Example fix

pip install -U mcore-adapter

When it happens

Trigger: Thrown at src/llamafactory/train/mca/workflow.py:106 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hiyouga/LlamaFactory@f28afaf635 (2026-08-14). Data as JSON: /api/errors/48d60d54a539456a. Report an issue: GitHub.