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

example.py does not work #11

Closed
SowreshMS opened this issue Aug 2, 2023 · 2 comments
Closed

example.py does not work #11

SowreshMS opened this issue Aug 2, 2023 · 2 comments

Comments

@SowreshMS
Copy link

SowreshMS commented Aug 2, 2023

RuntimeError Traceback (most recent call last)
in <cell line: 25>()
24 #test forward pass
25 with torch.no_grad():
---> 26 output = model(x)
27 print(f"Output shape: {output.shape}") # expected (batch_size, seq_Len)
28

4 frames
in apply_rotary_pos_emb(x, sin, cos, scale)
33 sin, cos = map(lambda t: duplicate_interleave(t * scale), (sin, cos))
34 # einsum notation for lambda t: repeat(t[offset:x.shape[1]+offset,:], "n d -> () n () (d j)", j=2)
---> 35 return (x * cos) + (rotate_every_two(x) * sin)
36
37

RuntimeError: The size of tensor a (512) must match the size of tensor b (64) at non-singleton dimension 2

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@kyegomez
Copy link
Owner

@SowreshMS Hey please excuse me for this, i was experimenting, it should work now.

@kyegomez
Copy link
Owner

@SowreshMS Hey please excuse me, it works now try again!

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