MCPcopy Create free account
hub / github.com/CERT-Lab/lora-sb / create_peft_model_cr

Function create_peft_model_cr

models.py:148–161  ·  view source on GitHub ↗
(model, args)

Source from the content-addressed store, hash-verified

146
147
148def create_peft_model_cr(model, args):
149
150 peft_config = LoraConfig(
151 r=args.lora_r,
152 lora_alpha=args.lora_alpha,
153 target_modules=["q_proj", "o_proj", "k_proj", "v_proj", "gate_proj", "up_proj", "down_proj"],
154 lora_dropout=args.lora_dropout,
155 bias="none",
156 task_type="CAUSAL_LM",
157 )
158
159 model = get_peft_model(model, peft_config)
160
161 return model, peft_config
162

Callers 1

finetuneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected