From 8a15f932af45f9532bbec48dac7171677cf5616a Mon Sep 17 00:00:00 2001 From: Ashish <1856117+ashishdatta@users.noreply.github.com> Date: Tue, 16 Apr 2024 06:03:47 -0700 Subject: [PATCH] Removed unnecessary conditional branches --- llama.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/llama.cpp b/llama.cpp index f2fd97d00..45da226b1 100644 --- a/llama.cpp +++ b/llama.cpp @@ -8185,15 +8185,7 @@ struct llm_build_context { cb(cur, "ffn_out", il); } - if (model.layers[il].ffn_norm) { - // non-parallel residual - cur = ggml_add(ctx0, cur, ffn_inp); - } else { - // add together residual + FFN + self-attention - cur = ggml_add(ctx0, cur, inpL); - cur = ggml_add(ctx0, cur, attn_out); - } - + cur = ggml_add(ctx0, cur, ffn_inp); cb(cur, "l_out", il); // input for next layer