For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Python class
TransposedRotaryEmbedding
TransposedRotaryEmbedding
class max.experimental.nn.rope.TransposedRotaryEmbedding(weight)
Bases: RotaryEmbedding
Applies RoPE using a transposed head-dimension layout.
-
Parameters:
-
weight (Tensor)
forward()
forward(x, start_pos=0)
Defines the computation performed by the module.
Users must override this method in their subclass to define the module’s computation.
-
Parameters:
-
Returns:
-
The result of applying the module to the input.
-
Raises:
-
NotImplementedError – If the subclass does not override this method.
-
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!