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

[BUG] Why is the backpropagation calculation so slow when I use the mamba network? #220

Open
1325116124 opened this issue May 26, 2024 · 6 comments
Assignees
Labels
bug Something isn't working no-issue-activity

Comments

@1325116124
Copy link

1325116124 commented May 26, 2024

When I used the mamba network, I defined a loss to test backpropagation and found that the calculation was very slow. Setting the len length to 1024 requires a long waiting time. code show as below:

`import torch
import torch.nn as nn
from zeta.nn import MambaBlock

block = MambaBlock(dim=512, depth=1)
x = torch.randn(1, 1024, 512)
target = torch.randn(1, 1024, 512)
loss_fn = nn.MSELoss()

y = block(x)
loss = loss_fn(y, target)
loss.backward()
print("Output shape:", y.shape)
print("Loss value:", loss.item())
`

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
@1325116124 1325116124 added the bug Something isn't working label May 26, 2024
Copy link

Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.

@kyegomez
Copy link
Owner

@1325116124 its using the mamba scan, or SSM, it should be updated soon!

@Alex-Naxitus
Copy link

I had the same problem. I don't suppose you managed to fix it right ?

@kyegomez
Copy link
Owner

@Alex-Naxitus yes, it should be updated now!

@kyegomez
Copy link
Owner

@Alex-Naxitus @1325116124 it was the backscan that was really slow, let me know so I can close this issuee!

Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

No branches or pull requests

3 participants