Untitled
Anonymous
plain_text
12/28/2023 3:20 PM
464 B
14
Indexable
from peft import LoraConfig, get_peft_model
config = LoraConfig(
peft_type='LORA',
r=8, #attention heads
lora_alpha=32, #alpha scaling
target_modules=["query","value"] ,
lora_dropout=0.01,
task_type="SEQ_CLS" # set this for Sequence Classification
)
model = get_peft_model(model, config)
print_trainable_parameters(model)Editor is loading...
Leave a Comment