lora_target_modules

This commit is contained in:
Eric Wang 2023-03-24 14:08:46 -07:00
parent 88f698ac82
commit f3e4809593
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ python finetune.py \
--lora_r 8 \ --lora_r 8 \
--lora_alpha 16 \ --lora_alpha 16 \
--lora_dropout 0.05 \ --lora_dropout 0.05 \
--target_modules '[q_proj,v_proj]' \ --lora_target_modules '[q_proj,v_proj]' \
--train_on_inputs \ --train_on_inputs \
--group_by_length --group_by_length
``` ```

View File

@ -37,7 +37,7 @@ def train(
lora_r: int = 8, lora_r: int = 8,
lora_alpha: int = 16, lora_alpha: int = 16,
lora_dropout: float = 0.05, lora_dropout: float = 0.05,
target_modules: List[str] = [ lora_target_modules: List[str] = [
"q_proj", "q_proj",
"v_proj", "v_proj",
], ],
@ -110,7 +110,7 @@ def train(
config = LoraConfig( config = LoraConfig(
r=lora_r, r=lora_r,
lora_alpha=lora_alpha, lora_alpha=lora_alpha,
target_modules=target_modules, target_modules=lora_target_modules,
lora_dropout=lora_dropout, lora_dropout=lora_dropout,
bias="none", bias="none",
task_type="CAUSAL_LM", task_type="CAUSAL_LM",