From d113d5d98610260295d7828da0520cfc1510356f Mon Sep 17 00:00:00 2001 From: jinbridge <2635480475@qq.com> Date: Tue, 3 Dec 2024 16:13:19 +0800 Subject: [PATCH] Fix MiniCPM-V-2_6 running on NPU --- python/llm/src/ipex_llm/transformers/npu_models/minicpmv_mp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/llm/src/ipex_llm/transformers/npu_models/minicpmv_mp.py b/python/llm/src/ipex_llm/transformers/npu_models/minicpmv_mp.py index 9817ef4a181..8d60eded3ef 100644 --- a/python/llm/src/ipex_llm/transformers/npu_models/minicpmv_mp.py +++ b/python/llm/src/ipex_llm/transformers/npu_models/minicpmv_mp.py @@ -198,7 +198,7 @@ def forward(self, x): @module_optimization def replace_with_Layernorm(layer, qtype=None, device='NPU', - modules_to_not_convert=[], group_size=0): + modules_to_not_convert=[], group_size=0, imatrix=None): if isinstance(layer, torch.nn.LayerNorm): return MinicpmVLayerNorm( weight=layer.weight.to(torch.float16),