nemo_automodel.components.models.deepseek_v3.rope_utils
nemo_automodel.components.models.deepseek_v3.rope_utils
Module Contents
Functions
API
Applies rotary positional embeddings to the input tensor.
Parameters:
Input tensor with positional embeddings to be applied.
Precomputed complex exponential values for positional embeddings.
Returns: torch.Tensor
torch.Tensor: Tensor with rotary embeddings applied.
Precomputes frequency-based complex exponential values for rotary positional embeddings.
Parameters:
Dimensionality of the rotary positional embeddings.
Maximum sequence length.
Original sequence length.
Fast beta value for the exponential computation.
Slow beta value for the exponential computation.
Base value for the exponential computation.
Factor value for the exponential computation.
Returns: torch.Tensor
torch.Tensor: Precomputed complex exponential values for positional embeddings.