Skip to content

Commit 02932be

Browse files
Update high_level.py
1 parent e453d1b commit 02932be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

quantllm/api/high_level.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,8 @@ def save_quantized_model(
755755
# Get original model path from cache if available
756756
original_path = None
757757
if hasattr(model, 'config') and hasattr(model.config, '_name_or_path'):
758-
from huggingface_hub import HfFolder
759-
cache_dir = os.getenv('HF_HOME', HfFolder.default_cache_path)
758+
759+
cache_dir = os.getenv('HF_HOME')
760760
model_id = model.config._name_or_path
761761
if '/' in model_id: # It's a hub model
762762
org, model_name = model_id.split('/')
@@ -881,4 +881,4 @@ def save_quantized_model(
881881
finally:
882882
if torch.cuda.is_available():
883883
torch.cuda.empty_cache()
884-
884+

0 commit comments

Comments
 (0)