mlx-bun library API
    Preparing search index...

    One rope instance (shared across layers — identical params ⇒ identical values). apply returns a NEW array; the caller owns disposal of both.

    Hierarchy (View Summary)

    Index
    • Parameters

      • dims: number
      • traditional: boolean
      • base: number | null

        Base for native fast_rope; null when freqs supplies the table.

      • scale: number

        fast_rope scale (1/factor for "linear", else 1).

      • freqs: MlxArray | null

        Precomputed frequency table (llama3/yarn/longrope/proportional).

      • preScale: number

        Pre-rope input scale on x[..., :dims] (yarn mscale / su scale).

      • preScaleAlways: boolean

        Apply preScale even when it is exactly 1.0 (SuScaledRoPE does; Yarn skips when mscale == 1.0).

      Returns UniversalRope

    base: number | null

    Base for native fast_rope; null when freqs supplies the table.

    dims: number
    freqs: MlxArray | null

    Precomputed frequency table (llama3/yarn/longrope/proportional).

    preScale: number

    Pre-rope input scale on x[..., :dims] (yarn mscale / su scale).

    preScaleAlways: boolean

    Apply preScale even when it is exactly 1.0 (SuScaledRoPE does; Yarn skips when mscale == 1.0).

    scale: number

    fast_rope scale (1/factor for "linear", else 1).

    traditional: boolean