Comments (2)
That would be strange, I'm getting 129M params:
In [1]: import torch
In [2]: from mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel
In [3]: model = MambaLMHeadModel.from_pretrained("state-spaces/mamba-130m")
In [4]: sum(p.numel() for p in model.parameters())
Out[4]: 129135360
from mamba.
I was going to respond that:
from mamba_ssm import MambaLMHeadModel
params = {
"d_model": 2560,
"n_layer": 32,
"vocab_size": 50432,
}
model = MambaLMHeadModel(**params)
num_param = sum(p.numel() for p in model.parameters() if p.requires_grad)
print(f"Number of parameters (local): {num_param}")
model = MambaLMHeadModel.from_pretrained("state-spaces/mamba-2.8b")
num_param = sum(p.numel() for p in model.parameters())
print(f"Number of parameters (downloaded): {num_param}")
gives:
Number of parameters (local): 1449006080
Number of parameters (downloaded): 2768345600
But I see you've updated the number of layers to the different configs. So problem solved.
from mamba.
Related Issues (20)
- Error with Mamba2 example code HOT 1
- How to use Mamba2 HOT 1
- Grad Norm: nan when using mamba in Dinov2 task HOT 6
- Bug in use_mem_eff_path with ngroups>1?
- Support for Mamba2 Model and Tokenizer in the Transformers Library HOT 1
- ngroups and tp HOT 2
- Mamba2 really work? HOT 4
- Backward error in triton
- Input output dimension HOT 1
- question about Parameter+delta? HOT 6
- Issues relating Selective Scan HOT 1
- Mamba Installation Failed; PyTorch+ROCm version 6.0 & 6.1 not working HOT 9
- Error with Mamba2 HOT 2
- Mamba2 assertion error HOT 2
- What is the difference between abiFALSE and abiTRUE? HOT 1
- ImportError: libcudart.so.11.0: cannot open shared object file: No such file or directory
- What is the difference between Mamba and Mamba2 HOT 1
- Result changes drastically depending on initialization HOT 2
- Failed to build installable wheels for some pyproject.toml based projects (mamba-ssm) HOT 3
- Mamba2 instance failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mamba.