Skip to content

Commit

Permalink
Add a specific error if HQQ is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Dec 20, 2023
1 parent 366c93a commit fb8ee9f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,12 @@ def ExLlamav2_HF_loader(model_name):


def HQQ_loader(model_name):
from hqq.engine.hf import HQQModelForCausalLM
from hqq.core.quantize import HQQLinear, HQQBackend
try:
from hqq.engine.hf import HQQModelForCausalLM
from hqq.core.quantize import HQQLinear, HQQBackend
except ModuleNotFoundError:
logger.error("HQQ is not installed. You can install it with:\n\npip install hqq")
return None

logger.info(f"Loading HQQ model with backend: {shared.args.hqq_backend}")

Expand Down

0 comments on commit fb8ee9f

Please sign in to comment.