去年编辑的一个帖子。摆了一段时间后重新回归,发送一下作为状态分界线。
很癫狂的体验,man,what can i say!
issue查看我的狗急跳墙状态
1.确定版本
- cuda
nvcc -V
- python
python --version
- torch
pip show torch
2.下载对应版本wheel
-
- causal-conv1d:https://github.com/Dao-AILab/causal-conv1d/releases/tag/v1.1.1
-
- mamba_ssm: https://github.com/state-spaces/mamba/releases/tag/v1.1.1
下载abiFALSE的whl
- mamba_ssm: https://github.com/state-spaces/mamba/releases/tag/v1.1.1
3.安装与测试
cd 进whl所在文件夹后pip
装好后运行测试代码
import torch
from mamba_ssm import Mambabatch, length, dim = 2, 64, 16
x = torch.randn(batch, length, dim).to("cuda")
model = Mamba(# This module uses roughly 3 * expand * d_model^2 parametersd_model=dim, # Model dimension d_modeld_state=16, # SSM state expansion factord_conv=4, # Local convolution widthexpand=2, # Block expansion factor
).to("cuda")
y = model(x)
assert y.shape == x.shape