From 4581e4f17fce2ca9defc9b0a8e99c231f120940c Mon Sep 17 00:00:00 2001 From: Cengguang Zhang Date: Wed, 20 Mar 2024 14:22:37 +0800 Subject: [PATCH] LLM: fix whiper model missing config. (#10473) * fix whiper model missing config. * fix style. * fix style. * style. --- python/llm/src/bigdl/llm/transformers/convert.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/llm/src/bigdl/llm/transformers/convert.py b/python/llm/src/bigdl/llm/transformers/convert.py index f6635283..8a6dc24f 100644 --- a/python/llm/src/bigdl/llm/transformers/convert.py +++ b/python/llm/src/bigdl/llm/transformers/convert.py @@ -691,7 +691,8 @@ def ggml_convert_low_bit(model, qtype, optimize_model=True, if optimize_model: 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 # Due to issue https://github.com/intel/intel-extension-for-pytorch/issues/454, # currently put interpolation execution into cpu