Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NPU] Update minicpm convert_mp to meet the latest refactor change #11937

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions python/llm/src/ipex_llm/transformers/npu_models/convert_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ def optimize_llm(
from ipex_llm.transformers.npu_models.qwen2_mp import qwen2_casullm_forward
convert_forward(model, Qwen2ForCausalLM, qwen2_casullm_forward)
elif model.config.model_type == "minicpm":
# for minicpm-1b
if intra_pp is None:
intra_pp = 2
if inter_pp is None:
inter_pp = 2

from ipex_llm.transformers.npu_models.minicpm_mp import gen_minicpm_fused_model_forward
from ipex_llm.transformers.npu_models.minicpm_mp import DecodeRunner, PrefillRunner

Expand Down
Loading