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

is a collection of Papers I have written.
© 2000 - Sang Park Except where otherwise noted, content on this site is licensed under a CC BY 4.0.
This site design was brought from Distill.