{"record":{"id":"f4535e700bbb26be","repo":"sgl-project/sglang","slug":"no-file-matching-quant-type-quant-type-r-in-rep","errorCode":null,"errorMessage":"No file matching quant type {quant_type!r} in {repo_id}. Available GGUF files: {available}","messagePattern":"No file matching quant type (.+?) in (.+?)\\. Available GGUF files: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/utils/hf_transformers/common.py","lineNumber":331,"sourceCode":"\n    if \":\" in model:\n        repo_id, _, quant_type = model.rpartition(\":\")\n        if repo_id.count(\"/\") != 1 or not quant_type:\n            return None\n\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:])","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/utils/hf_transformers/common.py#L313-L349","documentation":"When resolving an HF GGUF reference like owner/repo::Q4_K_M, no file in the repo ends with -<quant_type>.gguf. The error lists all .gguf files actually available so you can pick a valid quant type or full file reference.","triggerScenarios":"Calling resolve_hf_gguf_reference (or serving model::quant) where the repo has GGUF files but none whose name ends with the requested quant suffix, e.g. repo contains model-Q4_0.gguf but you asked for Q4_K_M.","commonSituations":"Typos in quant type names (q4km vs Q4_K_M), repos with non-standard filenames, or requesting a quant the uploader never created.","solutions":["Read the 'Available GGUF files' list in the message and use one of those quant types","Or pass the full reference owner/repo/path/file.gguf to skip quant resolution","Check the HF repo page to confirm the exact filename and its quant suffix"],"exampleFix":"# before\npython -m sglang.launch_server --model Qwen/Qwen2.5-7B-Instruct-GGUF::Q4_K_M\n# after (pick an available file)\npython -m sglang.launch_server --model Qwen/Qwen2.5-7B-Instruct-GGUF::q4_0","handlingStrategy":"validation","validationCode":"from huggingface_hub import list_repo_files\nfiles = [f for f in list_repo_files(repo_id, revision=revision) if f.endswith('.gguf')]\nquants = {f.rsplit('-', 1)[1][:-5] for f in files if '-' in f}\nassert quant_type in quants, f'{quant_type} not in {sorted(quants)}'","typeGuard":null,"tryCatchPattern":"try:\n    path = resolve_hf_gguf_reference(model)\nexcept ValueError as e:\n    # parse 'Available GGUF files' from str(e) and prompt user to choose\n    raise","preventionTips":["List repo files and validate the quant suffix before launching","Copy exact filenames from the HF repo page"],"tags":["gguf","huggingface","model-loading"],"backgroundTag":"model-file-not-found","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}