Open mayank64ce opened 3 months ago
Hi,
If you want to add L1/L2 regularization to your loss function, you can overwrite the Trainer, as shown here.
Thanks for the reply. Is it possible to pass additional parameters (like regularization weights) to the compute_loss
method ?
No, I'm afraid adding those isn't possible, as we already support 114 flags.
Feature request
I want to add L1/L2 regularization to the transformer training.
Motivation
Adding L1/L2 reg can promote sparser models that can accelerate inference and reduce storage.
Your contribution
Not sure.