Open erjieyong opened 1 year ago
@erjieyong did you find a solution? facing the same errror
@erjieyong tried different versions of cuda, same issue.
Hey all, I've managed to find an alternative in the end.
First of all, I suspect the error might be due to the weights not being allowed for tuning which resulted in the inf error.
I was able to overcome this by using the resume_from_checkpoint
function directly built into the alpaca lora's finetune.py[finetune.py](https://github.com/tloen/alpaca-lora/blob/8bb8579e403dc78e37fe81ffbb253c413007323f/finetune.py#L191)
To be more specific, pass in the path of the existing adapter that you want to further fine tune to the resume_from_checkpoint
argument when calling finetune.py
python finetune.py \
--base_model='decapoda-research/llama-7b-hf' \
--num_epochs=10 \
--cutoff_len=512 \
--group_by_length \
--output_dir='./lora-alpaca' \
--lora_target_modules='[q_proj,k_proj,v_proj,o_proj]' \
--lora_r=16 \
--micro_batch_size=8
--resume_from_checkpoint='./alpaca-lora'
adding argument is_trainable=True
to PeftModel.from_pretrained(...)
should work
First of all, a great thank you for sharing this model to the world!!!
Anyway, i've been trying to train my own model based off of this repo.
My objective of this training was to made use of unsupervised training dataset to get the model to understand how words are written in my domain (basically masked language modelling). Reason i don't use the conventional instructional fine tuning is because there's no such dataset of sufficient quantity available to me.
The 2 main changes i've made are as follows 1) instead of fine tuning from Llama's weights, i'll finetune from a existing alpaca-lora's weight. As such, i've edited the code as follows
as well as
2) edited the dataset to my own. (I am not using the prompt template). My code for generating the dataset as follows:
However, i keep facing the following error no matter how i tweak the code. Really appreciate any help rendered!
Environment Python: 3.9 cuda: 11.8