]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml-metal: fix yarn rope (#3937)
authorXiao-Yong Jin <redacted>
Fri, 3 Nov 2023 18:00:31 +0000 (13:00 -0500)
committerGitHub <redacted>
Fri, 3 Nov 2023 18:00:31 +0000 (14:00 -0400)
ggml-metal.m

index b33a3cb8fd0128ac6478b9228e8609f75298ad96..acdb8384316862ba2c0943b2179d0140b96adc83 100644 (file)
@@ -1403,7 +1403,8 @@ void ggml_metal_graph_compute(
                             const int n_past     = ((int32_t *) dst->op_params)[0];
                             const int n_dims     = ((int32_t *) dst->op_params)[1];
                             const int mode       = ((int32_t *) dst->op_params)[2];
-                            const int n_orig_ctx = ((int32_t *) dst->op_params)[3];
+                            // skip 3, n_ctx, used in GLM RoPE, unimplemented in metal
+                            const int n_orig_ctx = ((int32_t *) dst->op_params)[4];
 
                             float freq_base, freq_scale, ext_factor, attn_factor, beta_fast, beta_slow;
                             memcpy(&freq_base,   (int32_t *) dst->op_params +  5, sizeof(float));