---
title: "mropeRotaryEmbeddingVarlen"
sidebar_label: "mropeRotaryEmbeddingVarlen"
description: "Kotlin binding reference: mropeRotaryEmbeddingVarlen."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[mropeRotaryEmbeddingVarlen](mropeRotaryEmbeddingVarlen.md)

# mropeRotaryEmbeddingVarlen

[common]\
fun [mropeRotaryEmbeddingVarlen](mropeRotaryEmbeddingVarlen.md)(input: [Tensor](../Tensor/index.md), positionIds: [Tensor](../Tensor/index.md), mropeSections: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html), interleavedSections: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)? = null, theta: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)? = null, scaling: [RopeScaling](../RopeScaling/index.md)? = null, mode: [RotaryMode](../RotaryMode/index.md)? = null, rotaryDim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)? = null, scale: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)? = null): [Tensor](../Tensor/index.md)

`mropeRotaryEmbeddingVarlen(input: Tensor, positionIds: Tensor, mropeSections: LongArray, interleavedSections: Boolean? = null, theta: Double? = null, scaling: RopeScaling? = null, mode: RotaryMode? = null, rotaryDim: Long? = null, scale: Double? = null)`: the `mrope_rotary_embedding_varlen` operator. Multi-section rotary position embedding over token-packed layouts (`cu_seqlens``[B+1]` Int32, as in `rotary_embedding_varlen`). 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.