Skip to contents

A step of the mistr_native implementation. Called by mistr_grouped_query_attention. See the file header for the source the module follows.

Usage

mistr_apply_rope(x, pos, theta = NULL, base = 10000)

Arguments

x

A vector; its length is taken and its elements indexed.

pos

Numeric; combined arithmetically in the body.

theta

Optional; may be NULL. Passed to is.null.

base

Passed to mistr_rope_angles. Defaults to 10000.

Value

The value of out, as built in the body.

Examples

mistr_apply_rope(c(1, 0, 1, 0), pos = 3)
#> [1] -0.9899925  0.1411200  0.9995500  0.0299955