Skip to content
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

TypeError: LayerNorm.__init__() got an unexpected keyword argument 'bias' #11

Open
Xuanfang1121 opened this issue Mar 12, 2024 · 2 comments

Comments

@Xuanfang1121
Copy link

When I run the demo code below I get an error,TypeError: LayerNorm.init() got an unexpected keyword argument 'bias'

from mamba_model import MambaModel
import torch

model = MambaModel.from_pretrained(pretrained_model_name="Zyphra/BlackMamba-2.8B")
model = model.cuda().half()
inputs = torch.tensor([1, 2]).cuda().long().unsqueeze(0)
out = model(inputs)

How to solve the above error? I need your help

@yury-tokpanov
Copy link
Contributor

yury-tokpanov commented Apr 10, 2024

This sounds like an environment configuration issue. Are you sure you installed everything correctly?

I've just followed our instructions in the fresh miniconda3 environment (in the container running Nvidia pytorch image: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch), and it worked fine. Btw, in that container you don't actually need to install fresh Python environment, I just wanted to test if installing from scratch will work.

@zxx0809
Copy link

zxx0809 commented Oct 31, 2024

Hello, I also encountered this problem, may I ask you to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants