Question regarding lora params

#3
by zhehuderek - opened

Thanks for sharing the model! I have one question: As in the original github repo, I noticed they use lora to train the model, while you directly load the model using LlamaForCausalLM (w/o lora params). So I wonder what's the difference between the model and the original one? Thank you!

The weights are the same. I merged the Lora weight with the original model weight, allowing this model to be loaded with LlamaForCausalLM and fine-tuned directly.

Thanks for answering. I think if the lora weights exist, usually you need to load model with codes like:

based_model = LlamaForCausalLM.from_pretrained(xxx)
model = PeftModel.from_pretrained(based_model, xxx)  # say if you use Peft for lora implementation

Thus I'm still confused that how did you merge the lora weights and load the model with LlamaForCausalLM, as the huggingface implementation of LlamaForCausalLM does not included any params of lora, right? I would really appreciate your help on this.

Best

zhehuderek changed discussion status to closed

Sign up or log in to comment