ggml_rope_ext function

  1. @Native<Pointer<ggml_tensor> Function(Pointer<ggml_context>, Pointer<ggml_tensor>, Pointer<ggml_tensor>, Pointer<ggml_tensor>, Int, Int, Int, Float, Float, Float, Float, Float, Float)>(ffi.Pointer<ggml_context>, ffi.Pointer<ggml_tensor>, ffi.Pointer<ggml_tensor>, ffi.Pointer<ggml_tensor>, ffi.Int, ffi.Int, ffi.Int, ffi.Float, ffi.Float, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>()
Pointer<ggml_tensor> ggml_rope_ext(
  1. Pointer<ggml_context> ctx,
  2. Pointer<ggml_tensor> a,
  3. Pointer<ggml_tensor> b,
  4. Pointer<ggml_tensor> c,
  5. int n_dims,
  6. int mode,
  7. int n_ctx_orig,
  8. double freq_base,
  9. double freq_scale,
  10. double ext_factor,
  11. double attn_factor,
  12. double beta_fast,
  13. double beta_slow,
)

custom RoPE c is freq factors (e.g. phi3-128k), (optional)

Implementation

@ffi.Native<
  ffi.Pointer<ggml_tensor> Function(
    ffi.Pointer<ggml_context>,
    ffi.Pointer<ggml_tensor>,
    ffi.Pointer<ggml_tensor>,
    ffi.Pointer<ggml_tensor>,
    ffi.Int,
    ffi.Int,
    ffi.Int,
    ffi.Float,
    ffi.Float,
    ffi.Float,
    ffi.Float,
    ffi.Float,
    ffi.Float,
  )
>()
external ffi.Pointer<ggml_tensor> ggml_rope_ext(
  ffi.Pointer<ggml_context> ctx,
  ffi.Pointer<ggml_tensor> a,
  ffi.Pointer<ggml_tensor> b,
  ffi.Pointer<ggml_tensor> c,
  int n_dims,
  int mode,
  int n_ctx_orig,
  double freq_base,
  double freq_scale,
  double ext_factor,
  double attn_factor,
  double beta_fast,
  double beta_slow,
);