pub fn rope_dynamic<'a>(
array: impl AsRef<Array>,
dimensions: i32,
traditional: bool,
base: impl Into<Option<f32>>,
scale: f32,
offset: impl AsRef<Array>,
freqs: impl Into<Option<&'a Array>>,
) -> Result<Array>Expand description
Optimized implementation of NN.RoPE with dynamic (array) offset.
This variant allows specifying the offset as an array, enabling different offsets for different positions in the input.
ยงParams
array: Input arraydimensions: The feature dimensions to apply rope totraditional: If true, uses the traditional rope implementationbase: The base used to compute angular frequency for each dimensionscale: The scale to apply to the positionsoffset: An array of position offsetsfreqs: Optional precomputed frequenciesstream: Stream to evaluate on