Fix deepseek-v32-fp4 b200 ci (#21072)

This commit is contained in:
Baizhou Zhang
2026-03-20 22:28:40 -07:00
committed by GitHub
parent 9614271ae4
commit 5f3393c04c

View File

@@ -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