state-spaces / mamba

Mamba SSM architecture
Apache License 2.0
12.74k stars 1.07k forks source link

mamba-2 error #427

Open Zhou-CyberSecurity-AI opened 3 months ago

Zhou-CyberSecurity-AI commented 3 months ago

AttributeError Traceback (most recent call last) Cell In[2], line 17 9 model = Mamba2( 10 # This module uses roughly 3 expand d_model^2 parameters 11 d_model=dim, # Model dimension d_model (...) 14 expand=2, # Block expansion factor 15 ).to("cuda") 16 t1 = time.time() ---> 17 y = model(x) 18 assert y.shape == x.shape 19 print(f"Time taken: {time.time() - t1:.3f} s")

File ~/anaconda3/envs/mamba/lib/python3.10/site-packages/torch/nn/modules/module.py:1511, in Module._wrapped_call_impl(self, *args, kwargs) 1509 return self._compiled_call_impl(*args, *kwargs) # type: ignore[misc] 1510 else: -> 1511 return self._call_impl(args, kwargs)

File ~/anaconda3/envs/mamba/lib/python3.10/site-packages/torch/nn/modules/module.py:1520, in Module._call_impl(self, *args, *kwargs) 1515 # If we don't have any hooks, we want to skip the rest of the logic in 1516 # this function, and just call forward. 1517 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks 1518 or _global_backward_pre_hooks or _global_backward_hooks 1519 or _global_forward_hooks or _global_forward_pre_hooks): ... 764 ) 765 x, B, C = torch.split(xBC_conv, [dim, ngroups dstate, ngroups * dstate], dim=-1) 766 x = rearrange(x, "b l (h p) -> b l h p", h=nheads)

AttributeError: 'NoneType' object has no attribute 'causal_conv1d_fwd'

casual_conv1d == 1.3.0 mamba-ssm==2.1.0 triton==2.2.0 torch==2.2.0

Xuan356 commented 3 months ago

hi~did you solve that problem? I have the same issue.