IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo struct

Struct_rope_ragged_paged

struct Struct_rope_ragged_paged[interleaved: Bool, rope_first: Bool]

Registers the mo.composite.rope.ragged graph op with the graph compiler.

Parameters

  • interleaved (Bool): Whether RoPE pairs adjacent real and imaginary components (real, imag, real, imag, ...) as in GGUF, rather than splitting them into halves (real, ..., real, imag, ..., imag) as in safetensors.
  • rope_first (Bool): Whether a partial RoPE rotates the leading columns of each head, leaving the trailing ones to pass through, rather than the other way around.

Implemented traits

AnyType, Deinitable, Movable

Methods

execute

static def execute[out_dtype: DType, dtype: DType, freq_dtype: DType, //, target: StringSpan[ImmStaticOrigin]](output: ManagedTensorSlice[IOSpec[_, _].FusedOutput, static_spec=output.static_spec], x: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=x.static_spec], input_row_offsets: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input_row_offsets.static_spec], start_pos: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=start_pos.static_spec], freqs_cis: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=freqs_cis.static_spec], ctx: DeviceContext)