From 04167d9e26e6166cd5404b75959295d2755ba8f0 Mon Sep 17 00:00:00 2001 From: ryan-mangeno Date: Wed, 29 Oct 2025 12:20:50 -0400 Subject: [PATCH] fixed where I added residual, now gives much much better embeddings~ --- src/llama-model.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama-model.cpp b/src/llama-model.cpp index fcb152c7de..1adc4f52e2 100644 --- a/src/llama-model.cpp +++ b/src/llama-model.cpp @@ -8280,11 +8280,11 @@ struct llm_build_modern_bert : public llm_graph_context { // re-add the layer input cur = ggml_add(ctx0, cur, inpL); - + + ggml_tensor * ffn_inp = cur; // attention layer norm cur = build_norm(cur, model.layers[il].ffn_norm, nullptr, LLM_NORM, il); - ggml_tensor * ffn_inp = cur; cb(ffn_inp, "ffn_inp", il); cur = build_ffn(cur,