We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From colab, the 2nd SinusoidalEmbeddings example
from zeta import apply_rotary_pos_emb import torch # Create query and key tensors q = torch.randn(2, 3, 4) k = torch.randn(2, 3, 4) # Generate frequency and scale embeddings using SinusoidalEmbeddings # Apply rotary positional embeddings q_emb, k_emb = apply_rotary_pos_emb(q, k, freqs, scale)
Has the error
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) [<ipython-input-39-a72a64e54f5b>](https://localhost:8080/#) in <cell line: 11>() 9 10 # Apply rotary positional embeddings ---> 11 q_emb, k_emb = apply_rotary_pos_emb(q, k, freqs, scale) [/usr/local/lib/python3.10/dist-packages/zeta/nn/embeddings/xpos_relative_position.py](https://localhost:8080/#) in apply_rotary_pos_emb(x, sin, cos, scale) 69 """ 70 sin, cos = map(lambda t: duplicate_interleave(t * scale), (sin, cos)) ---> 71 return (x * cos) + (rotate_every_two(x) * sin) 72 73 RuntimeError: The size of tensor a (4) must match the size of tensor b (128) at non-singleton dimension 2
This is another instance of the problem reported in #106 which I'm still testing the fix for.
The text was updated successfully, but these errors were encountered:
Stale issue message
Sorry, something went wrong.
kyegomez
No branches or pull requests
From colab, the 2nd SinusoidalEmbeddings example
Has the error
This is another instance of the problem reported in #106 which I'm still testing the fix for.
Upvote & Fund
The text was updated successfully, but these errors were encountered: