fix issue 1407 (#11171)

This commit is contained in:
Guoqiong Song 2024-06-05 13:35:57 -07:00 committed by GitHub
parent bfa1367149
commit f6d5c6af78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -822,7 +822,7 @@ def ggml_convert_low_bit(model, qtype, optimize_model=True,
if optimize_model:
model = _optimize_post(model, lightweight_bmm)
if hasattr(model, "config") and \
if hasattr(model, "config") and hasattr(model.config, "model_type") and \
model.config.model_type == "qwen" and hasattr(model.config, "visual"):
# for Qwen-VL-Chat
# Due to issue https://github.com/intel/intel-extension-for-pytorch/issues/454,