mlx_rs::nn

Type Alias Rope

Source
pub type Rope = RotaryPositionalEncoding;
Expand description

Type alias for RotaryPositionalEncoding.

Aliased Type§

struct Rope {
    pub dimensions: i32,
    pub traditional: bool,
    pub base: f32,
    pub scale: f32,
}

Fields§

§dimensions: i32

The feature dimensions to be rotated. If the input feature is larger than dims then the rest is left unchanged

§traditional: bool

If true choose the traditional implementation which is slightly less efficient

§base: f32

The base used to compute angular frequency for each dimension in the positional encodings

§scale: f32

scale used to scale the positions