Vim icon indicating copy to clipboard operation
Vim copied to clipboard

TypeError: causal_conv1d_fwd(): incompatible function arguments.

Open innocence0206 opened this issue 1 year ago • 13 comments

Hi, thanks for the great work! I encountered the following error: image I‘m wondering if conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias,None, True) should be conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias, True) in mamba-1p1p1/mamba_ssm/ops/selective_scan_interface.py ?

innocence0206 avatar Mar 01 '24 06:03 innocence0206

I think you may be right, I encountered the same problem, I found that the function causal_conv1d_fwd() used in the code only requires passing in 4 parameters. causal_conv1d_fwd(const at::Tensor &x, const at::Tensor &weight, const c10::optional<at::Tensor> &bias_, bool silu_activation).

This is different from the same function in the official repo.

fengxiaoming520 avatar Mar 02 '24 02:03 fengxiaoming520

Make sure to change "causal_conv1d>=1.1.0" to "causal_conv1d==1.1.0" in mamba-1p1p1/setup.py before installation. The causal_conv1d repo is updated and the newer versions are not compatible with this repo.

anasiri avatar Mar 04 '24 17:03 anasiri

Thanks for the solution! I tried to modify causal_conv1d_cuda.causal_conv1d_fwd, but encountered another problem, may I ask how causal_conv1d_cuda.causal_conv1d_bwd should be modified? image

Alldaychubby avatar Mar 06 '24 08:03 Alldaychubby

Hi, thanks for the great work! I encountered the following error: image I‘m wondering if conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias,None, True) should be conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias, True) in mamba-1p1p1/mamba_ssm/ops/selective_scan_interface.py ?

is no no no no nonononononono image

a912289748 avatar Mar 07 '24 11:03 a912289748

Make sure to change "causal_conv1d>=1.1.0" to "causal_conv1d==1.1.0" in mamba-1p1p1/setup.py before installation. The causal_conv1d repo is updated and the newer versions are not compatible with this repo.

什么意思,看不懂 哎,不行,教教我 我v mxnet336

a912289748 avatar Mar 07 '24 11:03 a912289748

I have sloved this question by reinstalling causal_conv1d: pip uninstall causal_conv1d and pip install causal_conv1d==1.1.0. Because the version of causal_conv1d in official repo is 1.0.0 which is incompatible for mamba_ssm==1.1.1. 😄

ubun23 avatar Mar 11 '24 06:03 ubun23

在mamba-1p1p1/mamba_ssm/ops/selective_scan_interface.py文件里,conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias,None, True) 改为 conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias, True),还有这里也修改 ``` dx, dconv1d_weight, dconv1d_bias = causal_conv1d_cuda.causal_conv1d_bwd( # x, conv1d_weight, conv1d_bias, dconv1d_out, None, dx, True x, conv1d_weight, conv1d_bias, dconv1d_out, dx, True )

我没有复现原文的指标,只是换了另一个数据集,目前训练和测试都没问题,指标也正常。你可以尝试我这样修改,希望对你有帮助

Alldaychubby avatar Mar 11 '24 06:03 Alldaychubby

I have sloved this question by reinstalling causal_conv1d: pip uninstall causal_conv1d and pip install causal_conv1d==1.1.0. Because the version of causal_conv1d in official repo is 1.0.0 which is incompatible for mamba_ssm==1.1.1. 😄 Thanks, i solve this problem with this method

LiwenWang919 avatar Mar 11 '24 12:03 LiwenWang919

在mamba-1p1p1/mamba_ssm/ops/selective_scan_interface.py文件里, 改为 ,还有这里也修改 ``` dx, dconv1d_weight, dconv1d_bias = causal_conv1d_cuda.causal_conv1d_bwd( # x, conv1d_weight, conv1d_bias, dconv1d_out, None, dx, True x, conv1d_weight, conv1d_bias, dconv1d_out, dx, Trueconv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias,None, True)``conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias, True) )

我没有复现原文的指标,只是换了另一个数据集,目前训练和测试都没问题,指标也正常。你可以尝试我这样修改,希望对你有帮助
`

您好,请问可以分享一下selective_scan_interface.py文件吗?我按照您的方法修改了,但是似乎没有生效,是否还有其他地方需要修改呢?感谢!

dandeperson avatar Apr 28 '24 03:04 dandeperson

I con't use "pip install" or "conda install" to get the causal_conv1d==1.1.0, I used causal_conv1d==1.1.3 by .whl, now I have no idea for the version1.1.0

sivircc avatar May 06 '24 12:05 sivircc

I con't use "pip install" or "conda install" to get the causal_conv1d==1.1.0, I used causal_conv1d==1.1.3 by .whl, now I have no idea for the version1.1.0

Please use pip install causal_conv1d==1.1.1

chengyi-chris avatar May 06 '24 13:05 chengyi-chris

在mamba-1p1p1/mamba_ssm/ops/selective_scan_interface.py文件里,conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias,None, True) 改为 conv1d_out = causal_conv1d_cuda.causal_conv1d_fwd(x, conv1d_weight, conv1d_bias, True),还有这里也修改 ``` dx, dconv1d_weight, dconv1d_bias = causal_conv1d_cuda.causal_conv1d_bwd( # x, conv1d_weight, conv1d_bias, dconv1d_out, None, dx, True x, conv1d_weight, conv1d_bias, dconv1d_out, dx, True )

我没有复现原文的指标,只是换了另一个数据集,目前训练和测试都没问题,指标也正常。你可以尝试我这样修改,希望对你有帮助

Thanks for the solution you provided, I have solved the problem successfully

yx-yyds avatar Jul 15 '24 01:07 yx-yyds