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

Why Mamba2 runs out of GPU memory when it faces to extreme long inputs? #614

Open
YuBicheng opened this issue Nov 2, 2024 · 2 comments
Open

Comments

@YuBicheng
Copy link

When I used Mamba2 for tasks related to ultra long sequence inputs, I found that it would result in GPU memory depletion errors. SSD should theoretically be able to handle inputs of infinite length. Every time an error is reported in the mamba_stplit_comv1d_scan_combined() function

@YuBicheng
Copy link
Author

Note: The problem occurred during the testing phase, and it can be run after the input is truncated

@Hprairie
Copy link
Contributor

Hprairie commented Nov 5, 2024

Mamba2 still uses extra memory to store hidden states in between chunks. If your chunk size is too small, then you could be creating a bunch of extra tensors that take up memory. It should also be noted that increasing the chunk_size too large could slow down the kernels which work better for shorter lengths.

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