LLM: fix whiper model missing config. (#10473)

* fix whiper model missing config.

* fix style.

* fix style.

* style.
This commit is contained in:
Cengguang Zhang 2024-03-20 14:22:37 +08:00 committed by GitHub
parent e41d556436
commit 4581e4f17f

View file

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