{
  "id": "huggingface/peft-adapter-name-collision",
  "signature": "ValueError: An adapter with the name 'default' is already loaded. Use a unique adapter name or disable this adapter.",
  "signature_zh": "ValueError: 名为 'default' 的适配器已加载。请使用唯一的适配器名称或禁用此适配器。",
  "regex": "ValueError: An adapter with the name '.*' is already loaded\\. Use a unique adapter name or disable this adapter\\.",
  "domain": "huggingface",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "PEFT (Parameter-Efficient Fine-Tuning) prevents loading multiple adapters with the same name to avoid weight conflicts. This occurs when calling `load_adapter` twice with the same name or when an adapter named 'default' is already active.",
  "root_cause_type": "generic",
  "root_cause_zh": "PEFT（参数高效微调）阻止加载同名适配器以避免权重冲突。当使用相同名称两次调用 `load_adapter` 或名为 'default' 的适配器已激活时，会发生此错误。",
  "versions": [
    {
      "version": "peft>=0.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "transformers>=4.31.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "torch>=1.13.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Removing the adapter with `delete_adapter('default')` before loading a new one may cause errors if the adapter is currently active and the model has been trained with it.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Setting `adapter_name=None` in `load_adapter` does not auto-generate a unique name; it defaults to 'default' again.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use a unique name for each adapter load, such as including a timestamp or identifier. For example: `model.load_adapter(peft_model_id, adapter_name='my_adapter_v2')`.",
      "success_rate": 0.95,
      "how": "Use a unique name for each adapter load, such as including a timestamp or identifier. For example: `model.load_adapter(peft_model_id, adapter_name='my_adapter_v2')`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable the current adapter before loading a new one with the same name using `model.disable_adapter()`.",
      "success_rate": 0.85,
      "how": "Disable the current adapter before loading a new one with the same name using `model.disable_adapter()`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Use a unique name for each adapter load, such as including a timestamp or identifier. For example: `model.load_adapter(peft_model_id, adapter_name='my_adapter_v2')`.",
    "Disable the current adapter before loading a new one with the same name using `model.disable_adapter()`."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://huggingface.co/docs/peft/main/en/developer_guides/multi_adapter",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-10-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}