Skip to content

Commit

Permalink
Clip-g: Fix text_projection
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf committed Oct 24, 2024
1 parent 1138294 commit d8c5073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ class CLIPTextModel : public GGMLBlock {
auto text_projection = params["text_projection"];
ggml_tensor* pooled = ggml_view_1d(ctx, x, hidden_size, x->nb[1] * max_token_idx);
if (text_projection != NULL) {
pooled = ggml_mul_mat(ctx, ggml_cont(ctx, ggml_transpose(ctx, text_projection)), pooled);
pooled = ggml_nn_linear(ctx, pooled, text_projection, NULL);
} else {
LOG_DEBUG("Missing text_projection matrix, assuming identity...");
}
Expand Down

0 comments on commit d8c5073

Please sign in to comment.