Add a specific error if HQQ is missing

This commit is contained in:
oobabooga 2023-12-19 21:32:58 -08:00
parent 366c93a008
commit fb8ee9f7ff

View File

@ -413,8 +413,12 @@ def ExLlamav2_HF_loader(model_name):
def HQQ_loader(model_name):
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}")