Learn R Programming

ggmlR (version 0.6.1)

ggml_rope_ext_inplace: Extended RoPE Inplace (Graph)

Description

Creates a graph node for extended RoPE, modifying input tensor in place. Returns a view of the input tensor.

Usage

ggml_rope_ext_inplace(
  ctx,
  a,
  b,
  c = NULL,
  n_dims,
  mode = 0L,
  n_ctx_orig = 0L,
  freq_base = 10000,
  freq_scale = 1,
  ext_factor = 0,
  attn_factor = 1,
  beta_fast = 32,
  beta_slow = 1
)

Value

View of input tensor with RoPE applied in place

Arguments

ctx

GGML context

a

Input tensor

b

Position tensor (int32)

c

Optional frequency factors tensor (NULL for default)

n_dims

Number of dimensions to apply rotation to

mode

RoPE mode

n_ctx_orig

Original context length the model was trained on

freq_base

Base frequency for RoPE (default 10000 for most models)

freq_scale

Frequency scale factor (1.0 = no scaling)

ext_factor

YaRN extension factor (0.0 to disable)

attn_factor

Attention scale factor (typically 1.0)

beta_fast

YaRN parameter for fast dimensions

beta_slow

YaRN parameter for slow dimensions

See Also

Other rope: ggml_rope_multi(), ggml_rope_multi_inplace()