-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Feat]: Add support for meta llama hf model conversion #286
Conversation
Description: Llama 2 hf models have weights stored with diff name Signed-off-by: Nikhil Gupta <nikhilg.me@gmail.com>
Just parking it here for others. Merge is not required |
I'll take it because i expect a lot of finetunes will be in HF format. Ty. |
The HF models apply a permutation to wq and wk, so the RoPE is different fro the original Llama 2 models. The permutation must be undone to export from HF to llam2a.c's simple .bin files. |
Yes , I have noticed the gibberish too. That's why I left the comment in
the script for RoPe encodings extraction.
Thanks for validating it
…On Tue, Aug 15, 2023, 8:18 PM Alfonso² Peterssen ***@***.***> wrote:
The HF models apply a permutation to k and v, so the RoPE is different fro
the original Llama 2 models. The permutation must be undone to export from
HF to llam2a.c's simple .bin files.
It took me quite some time to figure this out, the symptom is it starts
degenerating and printing gibberish after ~20 or more tokens.
—
Reply to this email directly, view it on GitHub
<#286 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIHM53ZCZKX72DEMY2GWSC3XVOD5DANCNFSM6AAAAAA3PFC2BE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
... PR fix welcome |
I don't think this is working. #314 @Nick-infinity @karpathy |
|
[Feat]: Add support for meta llama hf model conversion
Description:
Llama 2 hf models have weights stored with diff name