src/transformers/models/wav2vec2_conformer/modeling_wav2vec2_conformer.py/Wav2Vec2ConformerRotaryPositionalEmbedding/__init__
class Wav2Vec2ConformerRotaryPositionalEmbedding:    def __init__(self, config):
        super().__init__()
        dim = config.hidden_size // config.num_attention_heads
        base = config.rotary_embedding_base

        inv_freq = 1.0 / (base ** (torch.arange(0, dim, 2).float() / dim))
        self.register_buffer("inv_freq", inv_freq)
        self.cached_sequence_length = None
        self.cached_rotary_positional_embedding = None