{"record":{"id":"8b4fa1a7fc037222","repo":"hiyouga/LlamaFactory","slug":"model-type-model-type-is-not-supported-by-the","errorCode":null,"errorMessage":"Model type `{model_type}` is not supported by the Megatron Bridge PT/SFT path. Supported model types: {sorted(MEGATRON_BRIDGE_SUPPORTED_MODELS)}. Multimodal / audio / omni models are not enabled in v0.","messagePattern":"Model type `(.+?)` is not supported by the Megatron Bridge PT/SFT path\\. Supported model types: (.+?)\\. Multimodal / audio / omni models are not enabled in v0\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/llamafactory/train/megatron_bridge/workflow.py","lineNumber":58,"sourceCode":"        DataArguments,\n        FinetuningArguments,\n        MegatronBridgeArguments,\n        ModelArguments,\n        TrainingArguments,\n    )\n\n\nlogger = get_logger(__name__)\n\n\ndef _check_model_support(model_args: \"ModelArguments\") -> None:\n    r\"\"\"Ensure the HF ``model_type`` is covered by the Megatron Bridge PT/SFT path.\"\"\"\n    config = HfAutoConfig.from_pretrained(\n        model_args.model_name_or_path, trust_remote_code=model_args.trust_remote_code\n    )\n    model_type = getattr(config, \"model_type\", None)\n    if model_type not in MEGATRON_BRIDGE_SUPPORTED_MODELS:\n        raise ValueError(\n            f\"Model type `{model_type}` is not supported by the Megatron Bridge PT/SFT path. \"\n            f\"Supported model types: {sorted(MEGATRON_BRIDGE_SUPPORTED_MODELS)}. \"\n            \"Multimodal / audio / omni models are not enabled in v0.\"\n        )\n\n\ndef _run_on_main_process(training_args: \"TrainingArguments\", work: Callable[[], None], sync_dir: str) -> None:\n    r\"\"\"Run ``work`` only on global rank 0, then synchronize other ranks.\n\n    Prefer ``torch.distributed.barrier`` when the process group is already initialized;\n    otherwise fall back to a file flag under ``sync_dir`` so non-main ranks wait for\n    shared filesystem writes (e.g. dataset export) to finish.\n    \"\"\"\n    done_file = os.path.join(sync_dir, \".main_process_done\")\n    is_main = getattr(training_args, \"process_index\", 0) == 0\n    wait_start = time.time()\n\n    import torch.distributed as dist","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/hiyouga/LlamaFactory/blob/f28afaf6355af515454dfb16c97d728307c93897/src/llamafactory/train/megatron_bridge/workflow.py#L40-L76","documentation":"Error \"Model type `{model_type}` is not supported by the Megatron Bridge PT/SFT path. Supported model types: {sorted(MEGATRON_BRIDGE_SUPPORTED_MODELS)}. Multimodal / audio / omni models are not enabled in v0.\" thrown in hiyouga/LlamaFactory.","triggerScenarios":"Thrown at src/llamafactory/train/megatron_bridge/workflow.py:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose a model whose model_type is listed in MEGATRON_BRIDGE_SUPPORTED_MODELS (text-only PT/SFT models); multimodal, audio, and omni models are not supported on this path.","Or train without Megatron Bridge (unset USE_MEGATRON_BRIDGE)."],"exampleFix":"# use a supported text model, e.g.\nmodel_name_or_path: meta-llama/Llama-3-8B","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f28afaf6355af515454dfb16c97d728307c93897","analyzedAt":"2026-08-14T21:57:28.298Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}