Skip to main content

ClikaRT::ops::validate_rotary_dim

function

validate_rotary_dim()

void validate_rotary_dim(int64_t rotary_dim, int64_t head_dim = -1)

Checks a rotary-embedding configuration up front: rotary_dim must be positive, even, and (when head_dim is given) no larger than head_dim.

Parameters

  • rotary_dim: the rotated prefix of the head dimension.
  • head_dim: the full head size; -1 (default) skips that check.

Throws

  • ClikaRT::Error: when the configuration is invalid (code_name() carries the reason). Returns nothing on success.

Declared in ClikaRT/compute/ops.h, line 2093