Skip to content

Commit

Permalink
Fix MiniCPM running on NPU
Browse files Browse the repository at this point in the history
  • Loading branch information
JinBridger committed Dec 2, 2024
1 parent 54d9a59 commit 1d2c014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 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,7 @@ 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 1d2c014

Please sign in to comment.