ClikaRT::ops::mrope_rotary_embedding
function
mrope_rotary_embedding()
Tensor mrope_rotary_embedding(
Tensor x0,
Tensor position_ids,
ClikaRT::Span<const std::int64_t> mrope_sections,
std::optional<bool> interleaved_sections = std::nullopt,
std::optional<double> theta = std::nullopt,
std::optional<RopeScaling> scaling = std::nullopt,
std::optional<RotaryMode> mode = std::nullopt,
std::optional<int64_t> rotary_dim = std::nullopt,
std::optional<double> scale = std::nullopt
)
Multi-section rotary position embedding over padded layouts.
Multi-section RoPE (the multimodal form): the head dimension is split into mrope_sections, and each section takes its angles from its OWN row of position_ids (e.g. temporal/height/width position streams). interleaved_sections picks the section layout; theta overrides the frequency base.
Throws
ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason ridescode_name()).
Returns: x0 rotated; same shape and dtype.
Declared in ClikaRT/compute/ops.h, line 2138