add NEFTune optimization

This commit is contained in:
anvie
2023-10-21 13:24:10 +07:00
parent 8fdff07e1f
commit 57fb40aa04
5 changed files with 88 additions and 1 deletions

View File

@@ -75,6 +75,10 @@ class FinetuningArguments:
default=0.1,
metadata={"help": "The beta parameter for the DPO loss."}
)
neftune_noise_alpha: Optional[float] = field(
default=None,
metadata={"help": "The alpha parameter for the NEFTune noise. By setting this the NEFTune optimization will be activated."}
)
def __post_init__(self):
if isinstance(self.lora_target, str): # support custom target modules/layers of LoRA