{"record":{"id":"927f41bab1fd9f36","repo":"sgl-project/sglang","slug":"quant-type-quant-type-r-is-ambiguous-in-repo-id","errorCode":null,"errorMessage":"Quant type {quant_type!r} is ambiguous in {repo_id}: {sorted(candidates)}. Pass the full owner/repo/path/file.gguf reference instead.","messagePattern":"Quant type (.+?) is ambiguous in (.+?): (.+?)\\. Pass the full owner/repo/path/file\\.gguf reference instead\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/utils/hf_transformers/common.py","lineNumber":336,"sourceCode":"\n        from huggingface_hub import HfApi\n\n        files = [\n            sibling.rfilename\n            for sibling in HfApi().repo_info(repo_id, revision=revision).siblings\n        ]\n        suffix = f\"-{quant_type}.gguf\"\n        candidates = [filename for filename in files if filename.endswith(suffix)]\n        if not candidates:\n            available = sorted(\n                filename for filename in files if filename.endswith(\".gguf\")\n            )\n            raise ValueError(\n                f\"No file matching quant type {quant_type!r} in {repo_id}. \"\n                f\"Available GGUF files: {available}\"\n            )\n        if len(candidates) > 1:\n            raise ValueError(\n                f\"Quant type {quant_type!r} is ambiguous in {repo_id}: \"\n                f\"{sorted(candidates)}. Pass the full owner/repo/path/file.gguf \"\n                \"reference instead.\"\n            )\n        return hf_hub_download(repo_id, candidates[0], revision=revision)\n\n    parts = model.strip(\"/\").split(\"/\")\n    if len(parts) < 2:\n        return None\n\n    if len(parts) > 2 and model.endswith(\".gguf\"):\n        repo_id = \"/\".join(parts[:2])\n        filename = \"/\".join(parts[2:])\n        return hf_hub_download(repo_id, filename, revision=revision)\n\n    if len(parts) != 2:\n        return None\n","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/utils/hf_transformers/common.py#L318-L354","documentation":"More than one file in the HF repo ends with -<quant_type>.gguf, so quant-type resolution is ambiguous. The error lists the matching files and asks you to name the exact one.","triggerScenarios":"Serving owner/repo::Q4_K_M when the repo contains e.g. both model-A-Q4_K_M.gguf and model-B-Q4_K_M.gguf.","commonSituations":"Multi-file GGUF repos that host several architectures or sizes with the same quantization.","solutions":["Pass the full owner/repo/path/file.gguf reference shown in the message","Or copy the exact filename from the sorted candidates list into the model string"],"exampleFix":"# before\n--model org/repo::Q4_K_M\n# after\n--model org/repo/model-B-Q4_K_M.gguf","handlingStrategy":"validation","validationCode":"matches = [f for f in files if f.endswith(f'-{quant}.gguf')]\nif len(matches) > 1: raise SystemExit(f'ambiguous: {matches}; pick a full path')","typeGuard":null,"tryCatchPattern":"except ValueError as e:\n    if 'ambiguous' in str(e): use_full_gguf_path()","preventionTips":["In multi-file GGUF repos always pass the full file path, not ::quant"],"tags":["gguf","huggingface","ambiguous-match"],"backgroundTag":"ambiguous-model-reference","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}