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

Integrate LucidRain's RotaryEmbeddings #621

Open
suchenzang opened this issue Jan 27, 2023 · 2 comments
Open

Integrate LucidRain's RotaryEmbeddings #621

suchenzang opened this issue Jan 27, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@suchenzang
Copy link
Contributor

See https://github.com/lucidrains/rotary-embedding-torch/blob/main/rotary_embedding_torch/rotary_embedding_torch.py

And from PaLM paper:

We use RoPE embeddings (Su et al., 2021) rather than absolute or relative position embeddings, since RoPE embeddings have been shown to have better performance on long sequence lengths.

@suchenzang suchenzang added enhancement New feature or request good first issue Good for newcomers labels Jan 27, 2023
@erip
Copy link

erip commented Jan 27, 2023

Since you already have xformers as a soft dependency, you should be able to pull it in directly from there if it's installed (similar to flash attention).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants