Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/llmcompressor/transformers/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import requests
from huggingface_hub import (
_CACHED_NO_EXIST,
HUGGINGFACE_CO_URL_HOME,
HfApi,
hf_hub_download,
try_to_load_from_cache,
)
Expand Down Expand Up @@ -149,7 +149,9 @@ def recipe_from_huggingface_model_id(
logger.debug("HF_HUB_OFFLINE is set, skipping recipe download from HuggingFace")
return None

model_id_url = os.path.join(HUGGINGFACE_CO_URL_HOME, hf_stub)
# Use custom HF_ENDPOINT
hf_api = HfApi()
model_id_url = f"{hf_api.endpoint.rstrip('/')}/{hf_stub}"
request = requests.head(model_id_url)

if request.status_code != 200:
Expand Down