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

Don't hardcode tied embed+unembed #211

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

haileyschoelkopf
Copy link
Contributor

I encountered problems when trying to use a Mamba model trained with untied embed + unembed weights in this codebase because MambaLMHeadModel.tie_weights() is always called.

This PR adds a tie_embeddings field to the config which defaults to true, and only ties the input + output embeddings if the config value is true.

@tridao tridao merged commit 5aa131d into state-spaces:main Mar 1, 2024
@tridao
Copy link
Collaborator

tridao commented Mar 1, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants