From 15260c5ba855aeadd4d07331a1682f24f19562c3 Mon Sep 17 00:00:00 2001 From: nopperl <54780682+nopperl@users.noreply.github.com> Date: Thu, 18 Jul 2024 10:26:34 +0200 Subject: [PATCH] fix layer input for swin norm --- src/llama.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/llama.cpp b/src/llama.cpp index b65d589d1..6d33b1edd 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -13838,12 +13838,14 @@ struct llm_build_context { struct ggml_tensor * inpSA = inpL; // norm - if (!hparams.swin_norm) { + if (hparams.swin_norm) { + cur = inpL; + } else { cur = llm_build_norm(ctx0, inpL, hparams, model.layers[il].attn_norm, NULL, LLM_NORM_RMS, cb, il); + cb(cur, "attn_norm", il); } - cb(cur, "attn_norm", il); // self-attention {