From 5f3393c04cf0de2eb99f5624b8be1125b34f5baf Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Fri, 20 Mar 2026 22:28:40 -0700 Subject: [PATCH] Fix deepseek-v32-fp4 b200 ci (#21072) --- python/sglang/srt/utils/common.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/sglang/srt/utils/common.py b/python/sglang/srt/utils/common.py index 9a9dcf542..c0aba341f 100644 --- a/python/sglang/srt/utils/common.py +++ b/python/sglang/srt/utils/common.py @@ -2691,8 +2691,18 @@ def has_hf_quant_config(model_path: str) -> bool: Returns: True if hf_quant_config.json exists, False otherwise. """ + # Check if the model_path is a local path if os.path.exists(os.path.join(model_path, "hf_quant_config.json")): return True + + from huggingface_hub import try_to_load_from_cache + + # Check if the model_path is a HuggingFace model ID and exists locally + result = try_to_load_from_cache(model_path, "hf_quant_config.json") + if isinstance(result, str): + return True + + # Check if the model_path is a remote URL and exists on the HuggingFace Hub try: from huggingface_hub import HfApi