]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llava : replace ggml_cpy with ggml_cont
authorslaren <redacted>
Mon, 19 Feb 2024 13:02:36 +0000 (14:02 +0100)
committerGeorgi Gerganov <redacted>
Mon, 19 Feb 2024 13:09:43 +0000 (15:09 +0200)
examples/llava/clip.cpp

index 98d512f67a0e2ce00ac80c3f69a3e4ae4709fe48..1a02fde3223348edf5a141279345a73775a570cd 100644 (file)
@@ -618,7 +618,7 @@ static ggml_cgraph * clip_image_build_graph(clip_ctx * ctx, const clip_image_f32
             KQV = ggml_reshape_4d(ctx0, KQV, d_head, num_positions, n_head, batch_size);
             KQV = ggml_cont(ctx0, ggml_permute(ctx0, KQV, 0, 2, 1, 3));
 
-            cur = ggml_cpy(ctx0, KQV, ggml_new_tensor_3d(ctx0, GGML_TYPE_F32, hidden_size, num_positions, batch_size));
+            cur = ggml_cont_3d(ctx0, KQV, hidden_size, num_positions, batch_size);
         }
 
         // attention output