Traceback (most recent call last):
File "test_mambav2.py", line 6, in <module>
from mamba_ssm import Mamba
File "/home/test/miniconda3/envs/mamba/lib/python3.8/site-packages/mamba_ssm/__init__.py", line 5, in <module>
from mamba_ssm.modules.mamba2 import Mamba2
File "/home/test/miniconda3/envs/mamba/lib/python3.8/site-packages/mamba_ssm/modules/mamba2.py", line 23, in <module>
from mamba_ssm.distributed.tensor_parallel import ColumnParallelLinear, RowParallelLinear
File "/home/test/miniconda3/envs/mamba/lib/python3.8/site-packages/mamba_ssm/distributed/tensor_parallel.py", line 14, in <module>
from src.distributed.distributed_utils import (
ModuleNotFoundError: No module named 'src
Hi @tridao ,
Thanks for your swift reply. I got the following error without using the conv1d package (can be solved by installing the conv1d package ). Any comments are highly appreciated.
@tyshiwo1
I solved it with a little trick:
Assuming you are using the function
mamba_chunk_scan_combinedin filessd_combined.py.First, add this into the beginning of the file to replace the original implementation of shape in pytorch.
Second, add
to_ttensor()to everywhere that is related to the error. For example, in my cases (only using the functionmamba_chunk_scan_combined), I need to addx, dt, A, B, C = to_ttensor(x, dt, A, B, C)before linereturn MambaChunkScanCombinedFn.apply(x, dt, A, B, C, chunk_size, D, z, dt_bias, initial_states, seq_idx, dt_softplus, dt_limit, return_final_states)inmamba_chunk_scan_combined; adddt = to_ttensor(dt)before linestates = _chunk_state_fwd(B, x, dt, dA_cumsum, seq_idx=seq_idx, states_in_fp32=True)in_mamba_chunk_scan_combined_fwd; changestates, final_states = _state_passing_fwd(rearrange(states, "... p n -> ... (p n)"),...tostates, final_states = _state_passing_fwd(to_ttensor(rearrange(states, "... p n -> ... (p n)")), ...in_mamba_chunk_scan_combined_fwd.And after done all these, the error disappears.
Your filename is wrongly named as
k_activation.pywhen it is importingk_activations. However, I am still facing issue after fixing that. The code works with Mamba v1.thanks i’ve updated