{
  "id": "huggingface/tokenizer-json-parse-error",
  "signature": "JSONDecodeError: Expecting value: line 1 column 1 (char 0) while loading tokenizer config from 'tokenizer.json'",
  "signature_zh": "JSONDecodeError: 从 'tokenizer.json' 加载分词器配置时，期望值：第 1 行第 1 列（字符 0）",
  "regex": "JSONDecodeError: Expecting value: line \\d+ column \\d+ \\(char \\d+\\) while loading tokenizer config from '.*'",
  "domain": "huggingface",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The tokenizer.json file is empty, truncated, or not valid JSON, often due to incomplete download or disk corruption.",
  "root_cause_type": "generic",
  "root_cause_zh": "tokenizer.json 文件为空、截断或不是有效的 JSON，通常由于下载不完整或磁盘损坏。",
  "versions": [
    {
      "version": "huggingface/tokenizers 0.15.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "huggingface/transformers 4.36.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "huggingface/tokenizers 0.16.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Manually edit tokenizer.json to fix the JSON syntax",
      "why_fails": "The file is often beyond repair (empty or truncated); manual editing rarely fixes the underlying structural corruption.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `from_pretrained(..., trust_remote_code=True)`",
      "why_fails": "This flag bypasses config validation but doesn't fix the corrupted tokenizer.json; the JSON decode error still occurs.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Delete the cached tokenizer file and re-download: `rm ~/.cache/huggingface/hub/models--org--model-name/snapshots/*/tokenizer.json` then re-run `AutoTokenizer.from_pretrained('org/model-name')`",
      "success_rate": 0.9,
      "how": "Delete the cached tokenizer file and re-download: `rm ~/.cache/huggingface/hub/models--org--model-name/snapshots/*/tokenizer.json` then re-run `AutoTokenizer.from_pretrained('org/model-name')`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Force re-download by setting `force_download=True` in `from_pretrained`: `AutoTokenizer.from_pretrained('org/model-name', force_download=True)`",
      "success_rate": 0.85,
      "how": "Force re-download by setting `force_download=True` in `from_pretrained`: `AutoTokenizer.from_pretrained('org/model-name', force_download=True)`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Delete the cached tokenizer file and re-download: `rm ~/.cache/huggingface/hub/models--org--model-name/snapshots/*/tokenizer.json` then re-run `AutoTokenizer.from_pretrained('org/model-name')`",
    "Force re-download by setting `force_download=True` in `from_pretrained`: `AutoTokenizer.from_pretrained('org/model-name', force_download=True)`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://huggingface.co/docs/tokenizers/en/quicktour#loading-a-tokenizer",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}