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

Mamba is not longer work with current code #2

Open
TinChung41 opened this issue Jun 6, 2024 · 4 comments
Open

Mamba is not longer work with current code #2

TinChung41 opened this issue Jun 6, 2024 · 4 comments

Comments

@TinChung41
Copy link

TinChung41 commented Jun 6, 2024

hi Vu, I'm working on Mamba text-classification right now and a few month back your code and this code work normaly

https://colab.research.google.com/drive/13EC5kbiZmtmFqBOsTW7j-A8JEVGEhvWg?usp=sharing

But as I running it couple week ago, it give out multiples error that doesn't make sense when in the requirement it use old version of mamba-ssm and transformer. I been on this rabbit hole for a while since there no current official document for mama-ssm yet.

@VuBacktracking
Copy link
Owner

VuBacktracking commented Jun 10, 2024

I updated the MambaConfig, you can check it now.
I think it works well now. But if you still have a problem, can you tell me the details of yours?

@TinChung41
Copy link
Author

TinChung41 commented Jun 18, 2024

Hi, thank you for responsding, last time I try to use newer releases of mamba since it been 6 months but end up getting error so I open this issue

I try to install the new updated repo of your but still running into Import error. Specifically, If I use mamba-ssm==1.2.0.post1 from the requirements.txt it give this error (even after use pip install mamba-ssm==1.2.0.post1 --no-cache-dir)

and when I install new releases of mamba-ssm I get:

Token is valid (permission: write).
Your token has been saved to /home/tinchung/.cache/huggingface/token
Login successful
Traceback (most recent call last):
File "/home/tinchung/Documents/GitHub/mamba-text-classification/trainer.py", line 21, in <module>
  model = MambaTextClassification.from_pretrained("state-spaces/mamba-130m")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tinchung/Documents/GitHub/mamba-text-classification/mamba/model.py", line 62, in from_pretrained
  config = MambaConfig(**config_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: MambaConfig() takes no arguments

So I kind of need to know which version you are using since old I can get fix the import error on the old mamba realease

@sanjayagra
Copy link

hi Vu, Can you please fix the above error (shared by TinChung41), I am also facing the same error?

Token is valid (permission: write).
Your token has been saved to /home/tinchung/.cache/huggingface/token
Login successful
Traceback (most recent call last):
File "/home/tinchung/Documents/GitHub/mamba-text-classification/trainer.py", line 21, in
model = MambaTextClassification.from_pretrained("state-spaces/mamba-130m")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tinchung/Documents/GitHub/mamba-text-classification/mamba/model.py", line 62, in from_pretrained
config = MambaConfig(**config_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: MambaConfig() takes no arguments

@Tangjiandd
Copy link

You can add the @DataClass decorator above the MambaConfig class.

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

4 participants