]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
metal : fix yarn (#4220)
authorXiao-Yong Jin <redacted>
Sun, 26 Nov 2023 08:30:02 +0000 (02:30 -0600)
committerGitHub <redacted>
Sun, 26 Nov 2023 08:30:02 +0000 (10:30 +0200)
get the correct n_orig_ctx in metal

ggml-metal.m

index a9fdd39035aa319f9648d81b8d5fb698247590a9..d52a1c3c48210b1f2805edde477b45001796c7e6 100644 (file)
@@ -1433,7 +1433,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));