Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Why is RotaryEmbedding not used when cross attending? #258

Open
pfeatherstone opened this issue Jul 11, 2024 · 1 comment
Open

Comments

@pfeatherstone
Copy link
Contributor

Why is RotaryEmbedding not used when cross attending?

if exists(rotary_pos_emb) and not has_context:
freqs, xpos_scale = rotary_pos_emb
q_xpos_scale, k_xpos_scale = (xpos_scale, xpos_scale ** -1.) if exists(xpos_scale) else (1., 1.)
q = apply_rotary_pos_emb(q, freqs, q_xpos_scale)
k = apply_rotary_pos_emb(k, freqs, k_xpos_scale)
if self.rotary_embed_values:
v = apply_rotary_pos_emb(v, freqs, k_xpos_scale)

@Jourdelune
Copy link

Jourdelune commented Aug 27, 2024

Hey, maybe related to this: #38. Maybe it should raise an error instead of disabling it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants