{
  "id": "huggingface/pipeline-task-unavailable",
  "signature": "ValueError: The task `text-generation` is not supported by the pipeline for this model. Supported tasks are: ['feature-extraction', 'fill-mask', 'sentence-similarity', 'text-classification'].",
  "signature_zh": "ValueError: 该模型不支持pipeline中的`text-generation`任务。支持的任务有：['feature-extraction', 'fill-mask', 'sentence-similarity', 'text-classification']。",
  "regex": "ValueError: The task `[a-z-]+` is not supported by the pipeline for this model\\. Supported tasks are:.*",
  "domain": "huggingface",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The pipeline is configured with a task that the model's architecture cannot perform, often because the model is an encoder-only type (e.g., BERT) but the task is decoder-only (e.g., text generation).",
  "root_cause_type": "generic",
  "root_cause_zh": "pipeline配置的任务是模型架构无法执行的，通常因为模型是仅编码器类型（如BERT），但任务是仅解码器类型（如文本生成）。",
  "versions": [
    {
      "version": "transformers 4.36.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "huggingface-hub 0.20.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python 3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "BERT is an encoder-only model; it lacks a language modeling head for generation, so forcing the task will cause runtime errors or produce gibberish.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is about model-task compatibility, not library version; a newer version won't make BERT generate text.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use a model that supports the desired task. For text generation, use a decoder-only model like GPT-2: `pipeline('text-generation', model='gpt2')`. Check the model card on Hugging Face Hub for supported tasks.",
      "success_rate": 0.95,
      "how": "Use a model that supports the desired task. For text generation, use a decoder-only model like GPT-2: `pipeline('text-generation', model='gpt2')`. Check the model card on Hugging Face Hub for supported tasks.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you must use the current model, choose a supported task. For example, for BERT: `pipeline('text-classification', model='bert-base-uncased')`.",
      "success_rate": 0.9,
      "how": "If you must use the current model, choose a supported task. For example, for BERT: `pipeline('text-classification', model='bert-base-uncased')`.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用支持所需任务的模型。对于文本生成，使用仅解码器模型如GPT-2：`pipeline('text-generation', model='gpt2')`。在Hugging Face Hub上查看模型卡片以了解支持的任务。",
    "如果必须使用当前模型，选择支持的任务。例如，对于BERT：`pipeline('text-classification', model='bert-base-uncased')`。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://huggingface.co/docs/transformers/main_classes/pipelines",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-11-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}