Skip to content

Commit b27a8dc

Browse files
committed
fix attn weight scaling after rebase
1 parent ef5a75f commit b27a8dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/llava/clip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ static ggml_cgraph * clip_image_build_graph_legacy(clip_ctx * ctx, const clip_im
757757
if (full_attn) {
758758
KQ = ggml_soft_max_ext(ctx0, KQ, nullptr, 1.0f / sqrtf((float)d_head), 0.0f);
759759
} else {
760-
KQ = ggml_soft_max_ext(ctx0, KQ, window_mask, 1.0f, 0.0f);
760+
KQ = ggml_soft_max_ext(ctx0, KQ, window_mask, 1.0f / sqrtf((float)d_head), 0.0f);
761761
}
762762

763763
struct ggml_tensor * KQV = ggml_mul_mat(ctx0, V, KQ);

0 commit comments

Comments
 (0)