This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: intellinjun <[email protected]>
- Loading branch information
1 parent
affe69c
commit 590d65b
Showing
2 changed files
with
27 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,7 +379,10 @@ static bool llama_model_eval_internal(model_context* ctx, const model_input* inp | |
|
||
for (int i = 0; i < n_expert_used; ++i) { | ||
ne_tensor* cur_expert; | ||
if (N == 1 && ctx0, model.layers[il].ffn_down_exp[0]->type == NE_TYPE_BTLA) { | ||
if (N == 1 && bestla_fusion_FFN_SiLu_f32f32_support( | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
intellinjun
Author
Contributor
|
||
model.layers[il].ffn_gate_exp[0]->data, model.layers[il].ffn_down_exp[0]->data, | ||
model.layers[il].ffn_up_exp[0]->data, N, cur->ne[0], | ||
model.layers[il].ffn_gate_exp[0]->ne[1], model.layers[il].ffn_down_exp[0]->ne[1])) { | ||
cur_expert = ne_mul_id_ffn_silu(ctx0, model.layers[il].ffn_down_exp, model.layers[il].ffn_gate_exp, | ||
model.layers[il].ffn_up_exp, n_expert, selected_experts, i, cur); | ||
} else { | ||
|
Why FFN fusion? You should check matmul+silu fusion