-
Notifications
You must be signed in to change notification settings - Fork 923
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
Error with Mamba2 #413
Comments
Please update causal_conv1d. |
Thanks for your prompt answer. After update, there is a new error: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I just try the test code of mamba-2 like this:
from mamba_ssm import Mamba2 import torch batch, length, dim = 2, 64, 1024 x = torch.randn(batch, length, dim).to("cuda") model = Mamba2( # This module uses roughly 3 * expand * d_model^2 parameters d_model=dim, # Model dimension d_model d_state=64, # SSM state expansion factor, typically 64 or 128 d_conv=4, # Local convolution width expand=2, # Block expansion factor headdim=128 ).to("cuda") y = model(x) assert y.shape == x.shape print("Mamba2 model parameters:", sum(p.numel() for p in model.parameters() if p.requires_grad)) print('x.shape:', x.shape, 'y.shape:', y.shape)
But there are some errors:
`
File "/opt/anaconda3/envs/medfusion-2d/lib/python3.8/site-packages/mamba_ssm/ops/triton/ssd_combined.py", line 761, in forward
causal_conv1d_cuda.causal_conv1d_fwd(rearrange(xBC, "b s d -> b d s"),
TypeError: causal_conv1d_fwd(): incompatible function arguments. The following argument types are supported:
1. (arg0: torch.Tensor, arg1: torch.Tensor, arg2: Optional[torch.Tensor], arg3: Optional[torch.Tensor], arg4: bool) -> torch.Tensor
Invoked with: tensor([[[ 0.6263, -0.1259, 0.6615, ..., 0.1121, 0.1023, -0.2840],
[-0.5732, 1.5656, 0.5829, ..., 0.6564, 0.7546, 0.1331],
[ 0.4265, -0.1785, 0.1311, ..., 0.6014, -1.0048, 0.0453],
...,
[ 0.1693, -0.7641, -0.0408, ..., -0.3669, -0.2489, -0.2052],
[ 0.8796, -0.5051, 0.3856, ..., 0.6248, 0.2461, -0.6594],
[-0.6611, 0.2886, 0.4760, ..., -0.0319, 0.6962, -1.1070]],
tensor([-0.3444, -0.2064, -0.3750, ..., 0.2153, -0.1905, -0.0108],
device='cuda:0', requires_grad=True), None, None, None, True
`
The text was updated successfully, but these errors were encountered: