{"record":{"id":"e79923b1730a4925","repo":"hiyouga/LlamaFactory","slug":"please-download-the-internvl-models-in-a-hugging-f","errorCode":null,"errorMessage":"Please download the internvl models in a Hugging Face–compatible format (for example, https://huggingface.co/OpenGVLab/InternVL3-8B-hf).","messagePattern":"Please download the internvl models in a Hugging Face–compatible format \\(for example, https://huggingface\\.co/OpenGVLab/InternVL3-8B-hf\\)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/llamafactory/model/patcher.py","lineNumber":404,"sourceCode":"    configure_visual_model(config)\n    configure_kv_cache(config, model_args, is_trainable)\n\n    if getattr(config, \"model_type\", None) == \"qwen\":\n        setattr(config, \"use_flash_attn\", model_args.flash_attn == \"fa2\")\n        for dtype_name, dtype in [(\"fp16\", torch.float16), (\"bf16\", torch.bfloat16), (\"fp32\", torch.float32)]:\n            setattr(config, dtype_name, model_args.compute_dtype == dtype)\n\n    if getattr(config, \"model_type\", None) == \"minicpmo\":\n        setattr(config, \"init_audio\", True)\n        setattr(config, \"init_tts\", False)\n\n    # replace the top-k gating method\n    if getattr(config, \"model_type\", None) == \"kimi_vl\" and is_trainable:\n        setattr(config.text_config, \"topk_method\", \"greedy\")\n\n    architectures = getattr(config, \"architectures\", None)\n    if isinstance(architectures, list) and \"InternVLChatModel\" in architectures:\n        raise ValueError(\n            \"Please download the internvl models in a Hugging Face–compatible format \"\n            \"(for example, https://huggingface.co/OpenGVLab/InternVL3-8B-hf).\"\n        )\n\n    if isinstance(architectures, list) and \"LlavaLlamaForCausalLM\" in architectures:\n        raise ValueError(\"Please download llava models with hf-compatible format: https://huggingface.co/llava-hf\")\n\n    if getattr(config, \"model_type\", None) == \"internlm3\" and not is_transformers_version_greater_than(\"4.47.1\"):\n        raise RuntimeError(\"InternLM3 model requires transformers>=4.47.1, please upgrade it.\")\n\n    if getattr(config, \"model_type\", None) == \"lfm2_vl\" and not is_transformers_version_greater_than(\"4.58.0\"):\n        raise RuntimeError(\n            \"LFM2.5-VL model requires transformers>=4.58.0 or install from commit: \"\n            \"pip install git+https://github.com/huggingface/transformers.git@3c2517727ce28a30f5044e01663ee204deb1cdbe\"\n        )\n\n    if getattr(config, \"model_type\", None) == \"moss_vl\":\n        check_version(\"transformers==4.57.1\", mandatory=True)","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/hiyouga/LlamaFactory/blob/f28afaf6355af515454dfb16c97d728307c93897/src/llamafactory/model/patcher.py#L386-L422","documentation":"Error \"Please download the internvl models in a Hugging Face–compatible format (for example, https://huggingface.co/OpenGVLab/InternVL3-8B-hf).\" thrown in hiyouga/LlamaFactory.","triggerScenarios":"Thrown at src/llamafactory/model/patcher.py:404 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Download an InternVL checkpoint in Hugging Face-compatible format, e.g. OpenGVLab/InternVL3-8B-hf, and set model_name_or_path to it."],"exampleFix":"model_name_or_path: OpenGVLab/InternVL3-8B-hf","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"}