Skip to content

Commit d8c5073

Browse files
committed
Clip-g: Fix text_projection
1 parent 1138294 commit d8c5073

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clip.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ class CLIPTextModel : public GGMLBlock {
712712
auto text_projection = params["text_projection"];
713713
ggml_tensor* pooled = ggml_view_1d(ctx, x, hidden_size, x->nb[1] * max_token_idx);
714714
if (text_projection != NULL) {
715-
pooled = ggml_mul_mat(ctx, ggml_cont(ctx, ggml_transpose(ctx, text_projection)), pooled);
715+
pooled = ggml_nn_linear(ctx, pooled, text_projection, NULL);
716716
} else {
717717
LOG_DEBUG("Missing text_projection matrix, assuming identity...");
718718
}

0 commit comments

Comments
 (0)