Skip to content

Commit cac6082

Browse files
jxyolexiyb
authored andcommitted
ggml-metal: fix yarn rope (ggml-org#3937)
1 parent da2d8cb commit cac6082

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml-metal.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,8 @@ void ggml_metal_graph_compute(
14031403
const int n_past = ((int32_t *) dst->op_params)[0];
14041404
const int n_dims = ((int32_t *) dst->op_params)[1];
14051405
const int mode = ((int32_t *) dst->op_params)[2];
1406-
const int n_orig_ctx = ((int32_t *) dst->op_params)[3];
1406+
// skip 3, n_ctx, used in GLM RoPE, unimplemented in metal
1407+
const int n_orig_ctx = ((int32_t *) dst->op_params)[4];
14071408

14081409
float freq_base, freq_scale, ext_factor, attn_factor, beta_fast, beta_slow;
14091410
memcpy(&freq_base, (int32_t *) dst->op_params + 5, sizeof(float));

0 commit comments

Comments
 (0)