espnet3.systems.f5tts.src.rotary.apply_rotary_pos_emb
Less than 1 minute
espnet3.systems.f5tts.src.rotary.apply_rotary_pos_emb
espnet3.systems.f5tts.src.rotary.apply_rotary_pos_emb(t: Tensor, freqs: Tensor, scale=1) → Tensor
Apply rotary embeddings to t, forced to fp32.
- Parameters:
- t – Queries or keys,
[b, h, n, d]or[b, n, d]. - freqs – Rotation angles,
[b, n, rot_dim]. - scale – xpos scale; always
1on the path F5 uses.
- t – Queries or keys,
- Returns:
trotated, cast back to its original dtype.
