{
  "id": "huggingface/trust-remote-code-required",
  "signature": "ValueError: Loading this model requires trust_remote_code=True. See https://huggingface.co/docs/hub/security",
  "signature_zh": "值错误：加载此模型需要trust_remote_code=True。请参阅https://huggingface.co/docs/hub/security",
  "regex": "trust_remote_code=True",
  "domain": "huggingface",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The model repository contains custom Python code (e.g., modeling file) that must be executed locally; trust_remote_code flag is not set for security reasons.",
  "root_cause_type": "generic",
  "root_cause_zh": "模型仓库包含必须本地执行的自定义Python代码（例如建模文件）；出于安全原因未设置trust_remote_code标志。",
  "versions": [
    {
      "version": "transformers>=4.30.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This parameter does not address the remote code execution requirement.",
      "fail_rate": 0.98,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Custom code is still required even from local files; trust_remote_code must be set.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set trust_remote_code=True in from_pretrained after reviewing the custom code.",
      "success_rate": 0.95,
      "how": "Set trust_remote_code=True in from_pretrained after reviewing the custom code.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Download and inspect the custom code files, then load with trust_remote_code=True.",
      "success_rate": 0.9,
      "how": "Download and inspect the custom code files, then load with trust_remote_code=True.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the transformers CLI to download the model and then load with trust_remote_code.",
      "success_rate": 0.85,
      "how": "Use the transformers CLI to download the model and then load with trust_remote_code.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Set trust_remote_code=True in from_pretrained after reviewing the custom code.",
    "Download and inspect the custom code files, then load with trust_remote_code=True.",
    "Use the transformers CLI to download the model and then load with trust_remote_code."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://huggingface.co/docs/hub/security#trust-remote-code",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.93,
  "resolvable": "true",
  "first_seen": "2023-06-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}