Untitled

 avatar
unknown
plain_text
a year ago
348 B
3
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