SAI990323 / TALLRec

Apache License 2.0
190 stars 31 forks source link

[Not issue] Environment setting sharing for CUDA 12.0 #46

Open tanukon opened 7 months ago

tanukon commented 7 months ago

Hi! Thank you for sharing your great repository!

I've encountered some errors because of the CUDA version difference and no longer available huggingface's alpaca-lora. I will share my environment and some parts modified to run TALLRec. I hope it will help you to run it!

Environment: EC2 g5.xlarge instance (Ubuntu20.04) CUDA 12.0 Python 3.10

library dependencies:

accelerate==0.26.1
appdirs==1.4.4
loralib==0.1.2
bitsandbytes==0.42.0
black==24.1.1
black[jupyter]
datasets==2.16.1
fire==0.5.0
gradio==4.16.0
peft==0.3.0
transformers==4.28.0
sentencepiece==0.1.99
scikit-learn==1.4.0

you need to reinstall peft by the following command.

pip uninstall peft -y
pip install git+https://github.com/huggingface/peft.git@e536616888d51b453ed354a6f1e243fecb02ea08

And you also need to change some lines in instruct_7B.sh. You need to change some lines according to your situation.

output_dir='<the output directory you want to save models: you need to change>'
base_model='baffo32/decapoda-research-llama-7B-hf'
train_data='<the path to your training data you prepared: you need to change>'
val_data='<the path to your validation data you prepared: you need to change>'
instruction_model='alpaca-lora-7B'

I wrote down more details in the blog, and you can see them if you want. blog link

SAI990323 commented 7 months ago

Thanks for pointing this out, it's really useful

xiaxin1998 commented 4 months ago

这个repo的所有issue里面的方法我都试过了 别的由于peft版本问题的方法我也都试过了 我把所有环境换成和这个issue的一模一样 我还是结果就是0.4+ 不论我怎么改变保存模型的参数 还有 训练的epoch数 都是这样