add NEFTune optimization

Former-commit-id: 603e0298af64116ac07130fe6661a9ba823c186c
This commit is contained in:
anvie
2023-10-21 13:24:10 +07:00
parent 6a955ccf4f
commit af2d61178d
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