Skip to content

Commit

Permalink
Fix MiniCPM-V models running on NPU (intel-analytics#12478)
Browse files Browse the repository at this point in the history
  • Loading branch information
JinBridger authored and przemekmatusiak committed Dec 10, 2024
1 parent fb361d0 commit 30ca175
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/llm/src/ipex_llm/transformers/npu_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ def optimize_npu_model(cls, *args, **kwargs):
model.share_memory()

if not pipeline:
if model.config.model_type in ["qwen2", "llama", "minicpm"]:
if (not hasattr(model, 'llm') and
model.config.model_type in ["qwen2", "llama", "minicpm"]):
from ipex_llm.transformers.npu_models.convert import optimize_llm_single_process
optimize_llm_single_process(
llm,
Expand Down

0 comments on commit 30ca175

Please sign in to comment.