Skip to content

Main content

Rotary Embedding One Pair Rotation Tool

Rotate one explicit coordinate pair; the caller supplies the RoPE position/frequency angle.

Loading tool…

Description

Rotate one rotary-embedding coordinate pair.

Language-model bookkeeping separates scores, probabilities, dimensions, capacity and positional transforms. A local ranking, padding or coordinate operation can illustrate a model component without running a model, sampling a token, fitting calibration or demonstrating output quality.

Rotate one rotary-embedding coordinate pair.

When to use this tool

Use Rotary Embedding One Pair Rotation when checking the stated model-dimension, ranking, probability-prefix or local transform convention.

How to use the tool and how it works

  1. Enter first, second, angleRadians. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read firstRotated, secondRotated. Use the output convention below.

Rotate one rotary-embedding coordinate pair. firstRotated = first*cos(angleRadians)-second*sin(angleRadians), secondRotated = first*sin(angleRadians)+second*cos(angleRadians).1

Rotary position embedding uses pairwise coordinate rotations. This helper performs one supplied planar rotation without constructing positional angles or a full attention model.2

Input fieldMeaning and unitsAccepted input
firstFirstRequired. Finite number.
secondSecondRequired. Finite number.
angleRadiansSupplied planar rotation angle in radians; no positional frequency schedule is constructed.Required. Finite number.
Output fieldInterpretationReturned shape
firstRotatedFirst RotatedRequired. Finite number.
secondRotatedSecond RotatedRequired. Finite number.
json
{
  "input": {
    "first": 3,
    "second": 4,
    "angleRadians": 0
  },
  "output": {
    "firstRotated": 3,
    "secondRotated": 4
  }
}

Limitations and assumptions

  • The angle is supplied in radians; no frequency schedule, token position, full embedding or transformer inference is generated.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a complete implementation with verified tensor/token conventions and appropriate model evaluation when actual inference, memory, sampling or quality results are required.

References

  1. Calculation and input contract: artificial-intelligence/rotary-embedding-one-pair-rotation — tool.io

  2. RoFormer: enhanced transformer with rotary position embedding — Jianlin Su and coauthors

Similar or alternative tools