Skip to content

Commit 22da055

Browse files
authored
metal : fix yarn (#4220)
get the correct n_orig_ctx in metal
1 parent 1ddb52e commit 22da055

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
@@ -1433,7 +1433,8 @@ void ggml_metal_graph_compute(
14331433
const int n_past = ((int32_t *) dst->op_params)[0];
14341434
const int n_dims = ((int32_t *) dst->op_params)[1];
14351435
const int mode = ((int32_t *) dst->op_params)[2];
1436-
const int n_orig_ctx = ((int32_t *) dst->op_params)[3];
1436+
// skip 3, n_ctx, used in GLM RoPE, unimplemented in metal
1437+
const int n_orig_ctx = ((int32_t *) dst->op_params)[4];
14371438

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

0 commit comments

Comments
 (0)