mikeybellissimo / LoRA-MPT

A repo for finetuning MPT using LoRA. It is currently configured to work with the Alpaca dataset from Stanford but can easily be adapted to use another.
Apache License 2.0
18 stars 7 forks source link

Target modules [Wqkv] not found in the base model. #4

Open madaracelio opened 1 year ago

madaracelio commented 1 year ago

After running this command python src/finetune.py --base_model 'mosaicml/mpt-7b-instruct' --data_path 'yahma/alpaca-cleaned' --output_dir './lora-mpt' --lora_target_modules '[Wqkv]', i got this error : Target modules [Wqkv] not found in the base model. Please check the target modules and try again.

  1. How can i resolve this ?
  2. And during the process, the folder "templates/alpaca.json" is missing too.

err

mikeybellissimo commented 1 year ago

Hi, I was changing around the files and the error must not have popped up for me because of some kind of caching my computer was doing. Just fixed it and pushed it so the template not found error should be all set. Let me know if it continues to be an issue. As for the Wqkv, I'm not sure why that's not working. Maybe try putting ['Wqkv'] instead of '[Wqkv]'. Also, are you using Windows or Linux/WSL for Windows?

madaracelio commented 1 year ago

Hi, thanks for reply. I'm using Windows. I try ['Wqkv'] instead of '[Wqkv]' after updating the repository. It's worked.

Thanks

mikeybellissimo commented 1 year ago

Glad to hear and happy to help!

mikeybellissimo commented 1 year ago

Also, I was in the middle of debugging something and accidentally commented out the PEFT model loading within generate.py when I uploaded this version you are working on so if you're having issues with that just reclone it.