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

Support Tied Weights in Llama Models #777

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Support Tied Weights in Llama Models #777

merged 2 commits into from
Oct 25, 2024

Conversation

Helw150
Copy link
Collaborator

@Helw150 Helw150 commented Oct 25, 2024

The new smaller Llama 3.2 1B and 3.2 3B models have tied weights - so Levanter throws an error currently if we try to import these models.

https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct/blob/main/config.json
Screenshot 2024-10-24 8 17 03 PM

This adds HF support for that argument and just switches to using embedding.unembed when Embeddings are tied!

@Helw150 Helw150 requested review from dlwh and Ivan-Zhou October 25, 2024 00:17
@dlwh dlwh merged commit 331c0aa into main Oct 25, 2024
8 checks passed
@dlwh dlwh deleted the will/tied-llama branch October 25, 2024 17:00
TheQuantumFractal pushed a commit that referenced this pull request Nov 5, 2024
The new smaller Llama 3.2 1B and 3.2 3B models have tied weights - so
Levanter throws an error currently if we try to import these models.


https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct/blob/main/config.json
![Screenshot 2024-10-24 8 17 03
PM](https://github.com/user-attachments/assets/08e79ed7-cab5-43f0-9ca6-f90e2fe73249)

This adds HF support for that argument and just switches to using
embedding.unembed when Embeddings are tied!
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