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

Function create_peft_model_it

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

Source from the content-addressed store, hash-verified

130
131
132def create_peft_model_it(model, args):
133
134 peft_config = LoraConfig(
135 r=args.lora_r,
136 lora_alpha=args.lora_alpha,
137 target_modules=["q_proj", "o_proj", "k_proj", "v_proj", "gate_proj", "up_proj", "down_proj"],
138 lora_dropout=0,
139 task_type="CAUSAL_LM",
140 )
141
142 model = get_peft_model(model, peft_config)
143
144 return model, peft_config
145
146
147

Callers 1

finetuneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected