From f6d518fc4cfebb3ecd2db71d705cffbe1331f588 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 25 Nov 2024 21:49:31 +0200 Subject: [PATCH] metal : enable mat-vec kernels for bs <= 4 (llama/10491) --- ggml/src/ggml-metal/ggml-metal.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml-metal/ggml-metal.m b/ggml/src/ggml-metal/ggml-metal.m index ce7afc61..ae29b8b2 100644 --- a/ggml/src/ggml-metal/ggml-metal.m +++ b/ggml/src/ggml-metal/ggml-metal.m @@ -1935,7 +1935,7 @@ static void ggml_metal_encode_node( // find the break-even point where the matrix-matrix kernel becomes more efficient compared // to the matrix-vector kernel - int ne11_mm_min = 1; + int ne11_mm_min = 4; #if 0 // the numbers below are measured on M2 Ultra for 7B and 13B models