sgl-project/sglang · error · ValueError
Quant type is ambiguous in : . Pass the full…
Error message
Quant type {quant_type!r} is ambiguous in {repo_id}: {sorted(candidates)}. Pass the full owner/repo/path/file.gguf reference instead. What it means
GGUF resolution error: the bare quant type 'quant_type' matches multiple candidate files in repo 'repo_id' (candidates listed). Ambiguity cannot be resolved automatically; pass the full owner/repo/path/file.gguf HF id so exactly one file is selected.
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
Example fix
# before --model org/repo::Q4_K_M # after --model org/repo/model-B-Q4_K_M.gguf
Defensive patterns
Strategy: validation
Validate before calling
matches = [f for f in files if f.endswith(f'-{quant}.gguf')]
if len(matches) > 1: raise SystemExit(f'ambiguous: {matches}; pick a full path') Try / catch
except ValueError as e:
if 'ambiguous' in str(e): use_full_gguf_path() Prevention
- In multi-file GGUF repos always pass the full file path, not ::quant
When it happens
Trigger: 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.
Common situations: Multi-file GGUF repos that host several architectures or sizes with the same quantization.
Related errors
- contains .gguf files; name the one to serve:\n
- No file matching quant type
- A GGUF encoder checkpoint cannot be combined with a second…
- Can't get gguf config for
- Cannot parse checkpoint quantization for
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/927f41bab1fd9f36.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/srt/utils/hf_transformers/common.py:336
from huggingface_hub import HfApi
files = [
sibling.rfilename
for sibling in HfApi().repo_info(repo_id, revision=revision).siblings
]
suffix = f"-{quant_type}.gguf"
candidates = [filename for filename in files if filename.endswith(suffix)]
if not candidates:
available = sorted(
filename for filename in files if filename.endswith(".gguf")
)
raise ValueError(
f"No file matching quant type {quant_type!r} in {repo_id}. "
f"Available GGUF files: {available}"
)
if len(candidates) > 1:
raise ValueError(
f"Quant type {quant_type!r} is ambiguous in {repo_id}: "
f"{sorted(candidates)}. Pass the full owner/repo/path/file.gguf "
"reference instead."
)
return hf_hub_download(repo_id, candidates[0], revision=revision)
parts = model.strip("/").split("/")
if len(parts) < 2:
return None
if len(parts) > 2 and model.endswith(".gguf"):
repo_id = "/".join(parts[:2])
filename = "/".join(parts[2:])
return hf_hub_download(repo_id, filename, revision=revision)
if len(parts) != 2:
return None
View on GitHub (pinned to 0132848349)