# Parameter count on mamba models

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fparameter-count-on-mamba-models%2F75489%3E%5C
**Category:** Beginners\
**Created:** [March 1, 2024, 3:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fparameter-count-on-mamba-models%2F75489 "2024-03-01T15:27:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iserrano0511](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/iserrano0511/32/24379_2.png) [@iserrano0511](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fiserrano0511)%5C
**Post date:** [March 1, 2024, 3:27pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fparameter-count-on-mamba-models%2F75489%2F1 "2024-03-01T15:27:34Z")

</div>

Hi everyone, I am still learning about this model and there is something I havent managed to wrap my head around: How do you calculate the number of parameters of the model?

From what I understand, the mamba block has 3ED^2 + D parameters from the linear projections and the RMSNorm per layer. Then, the embedding and LM head parts both have D \* Vocab size.

So from the config params we would get:

layers \* 3 _E \* D^2 + 2_D\*V= 24 \* 3 \* 2 \* 768^2 + 2 \* 768 \* 50277 = 162,178,560

The model card shows 130M, what am I missing?
