LoRA
Train
deepspeed로 get_peft_model()
, PeftModel.from_pretrained()
와의 차이는 trainable 여부다.
Merge
base_model = AutoModelForCausalLM.from_pretrained(base_model_path).to(0)
peft_model = PeftModel.from_pretrained(base_model, lora_path)
merged_model = peft_model.merge_and_unload()
merged_model.save_pretrained(merged_model_path)
Last Modified: 2024/10/24 00:49:43