Skip to content

Commit

Permalink
change inter_pp
Browse files Browse the repository at this point in the history
  • Loading branch information
cyita committed Nov 7, 2024
1 parent a7b6668 commit 48f33c3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/llm/src/ipex_llm/transformers/npu_models/convert_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,15 @@ def optimize_llm(
if intra_pp is None:
intra_pp = 2
if inter_pp is None:
inter_pp = 2 if group_size == 0 else 8
if group_size == 0:
inter_pp = 2
elif model.config.intermediate_size == 8192:
if model.config.hidden_size == 2048:
inter_pp = 1
else:
inter_pp = 2
else:
inter_pp = 8
convert_llama(model,
max_output_len=max_context_len,
max_prompt_len=max_prompt_len,
Expand Down

0 comments on commit 48f33c3

Please sign in to comment.