Skip to content
RED SAGSkills
easy5 pts · first answer countsfine-tuningloratooling

Adding LoRA with the PEFT library

What does get_peft_model(model, LoraConfig(...)) do in Hugging Face PEFT?

from peft import LoraConfig, get_peft_model
config = LoraConfig(r=16, lora_alpha=32, target_modules=["q_proj", "v_proj"])
model = get_peft_model(model, config)
model.print_trainable_parameters()
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions