Closed sherlcok314159 closed 3 weeks ago
I use peft and SFTrainer to train a lora model. And I want to fintune this lora model on new datasets. How can I manage this? When using the code below, the grad norm is always zero.
peft_model = ... model = AutoModelForCausalLM.from_pretrained( peft_model, device_map='auto', ) training_args = TrainingArguments(...) trainer = SFTrainer(...) trainer.train()
you can merge the peft model through merge_and_unload
function of peft
firstly, and then use the merged model to fine-tune.
I use peft and SFTrainer to train a lora model. And I want to fintune this lora model on new datasets. How can I manage this? When using the code below, the grad norm is always zero.