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

WARNING: Unused parameter in LoRA state dict #51

Closed
iclgg opened this issue May 5, 2023 · 6 comments
Closed

WARNING: Unused parameter in LoRA state dict #51

iclgg opened this issue May 5, 2023 · 6 comments

Comments

@iclgg
Copy link

iclgg commented May 5, 2023

Converts an RWKV model checkpoint in PyTorch format to an rwkv.cpp compatible file using convert_pytorch_to_ggml.py.
Get a LoRA checkpoint with https://github.com/Blealtan/RWKV-LM-LoRA.
Merges a LoRA checkpoint in PyTorch format (.pth) into an rwkv.cpp model file using merge_lora_into_ggml.py.
Warnings like that "Unused parameter in LoRA state dict blocks.13.att.receptance.lora_B(att.key.lora_A、att.value.lora_A、att.receptance.lora_A、ffn.key.lora_A、ffn.receptance.lora_A、ffn.value.lora_A、att.key.lora_B、att.value.lora_B、att.receptance.lora_B、ffn.key.lora_B、ffn.receptance.lora_B、ffn.value.lora_B)" were printed during the merge .
Using the merged model is poor and does not reflect the effect of lora.
Why does this happen?

@saharNooby
Copy link
Collaborator

If possible, can you provide the used LoRA checkpoint?

@iclgg
Copy link
Author

iclgg commented May 5, 2023

If possible, can you provide the used LoRA checkpoint?

Now I cannot access the computer, so I cannot provide the LoRA file for the time being. Do you know what might be causing this?

@saharNooby
Copy link
Collaborator

Probably the mistake in the merge script. It expects one format, but gets the other. I need an example LoRA checkpoint (does not even need to be trained) to be able to fix the script.

@iclgg
Copy link
Author

iclgg commented May 6, 2023

https://huggingface.co/iclgg/rwkv-lora/tree/main
This is a LoRA checkpoint based on RWKV-4-Raven-3B-v9x-Eng49%-Chn50%-Other1%-20230417-ctx4096.pth.
lora_alpha=32 lora_r=8 precision=fp16 --lora_parts=att,ffn,time,ln

@saharNooby
Copy link
Collaborator

@iclgg Thanks for the file! Can you please test this version of the merge script?

@iclgg
Copy link
Author

iclgg commented May 8, 2023

@iclgg Thanks for the file! Can you please test this version of the merge script?

It works well! Thank you.

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

No branches or pull requests

2 participants