diff options
author | Xiao-Yong Jin <jinxiaoyong@gmail.com> | 2023-11-26 02:30:02 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-26 10:30:02 +0200 |
commit | 22da05536ff4ad963080773bef1fb839fdab95d3 (patch) | |
tree | ef7772caa6f3028fd8f1f69b31896c560e6ecda9 | |
parent | 1ddb52ec38f9931925a587f45a23b1c37152c028 (diff) |
metal : fix yarn (#4220)
get the correct n_orig_ctx in metal
-rw-r--r-- | ggml-metal.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ggml-metal.m b/ggml-metal.m index a9fdd390..d52a1c3c 100644 --- a/ggml-metal.m +++ b/ggml-metal.m @@ -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)); |