ggml_rope method

Pointer<ggml_tensor> ggml_rope(
  1. Pointer<ggml_context> ctx,
  2. Pointer<ggml_tensor> a,
  3. Pointer<ggml_tensor> b,
  4. int n_dims,
  5. int mode,
)

rotary position embedding if (mode & 1) - skip n_past elements (NOT SUPPORTED) if (mode & GGML_ROPE_TYPE_NEOX) - GPT-NeoX style

b is an int32 vector with size a->ne2, it contains the positions

Implementation

ffi.Pointer<ggml_tensor> ggml_rope(
  ffi.Pointer<ggml_context> ctx,
  ffi.Pointer<ggml_tensor> a,
  ffi.Pointer<ggml_tensor> b,
  int n_dims,
  int mode,
) {
  return _ggml_rope(
    ctx,
    a,
    b,
    n_dims,
    mode,
  );
}