Skip to content

Commit

Permalink
metal : fix yarn (#4220)
Browse files Browse the repository at this point in the history
get the correct n_orig_ctx in metal
  • Loading branch information
jxy authored Nov 26, 2023
1 parent 1ddb52e commit 22da055
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ggml-metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 22da055

Please sign in to comment.