File size: 341 Bytes
a36cb22
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from peft import LoraConfig

import config

def load_adapter(target_modules):
    peft_config = LoraConfig(
        lora_alpha=config.LORA_ALPHA,
        lora_dropout=config.LORA_DROPOUT,
        r = config.LORA_RANK,
        bias="none",
        task_type=config.TASK_TYPE,
        target_modules=target_modules
    )
    return peft_config