summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao-Yong Jin <jinxiaoyong@gmail.com>2023-11-03 13:00:31 -0500
committerGitHub <noreply@github.com>2023-11-03 14:00:31 -0400
commit5ba37461711095c0284233dbd14f0d9010cdbf56 (patch)
tree73663def176fc3ab142b0602874d8a0703966266
parentabb77e7319aabc0b5cfb7c22da690a692489b6b7 (diff)
ggml-metal: fix yarn rope (#3937)
-rw-r--r--ggml-metal.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/ggml-metal.m b/ggml-metal.m
index b33a3cb8..acdb8384 100644
--- a/ggml-metal.m
+++ b/ggml-metal.m
@@ -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));