← All questions
Training & Fine-tuningMedium· Regularization· Pre-training· Fine-tuning

How should regularization be configured for a 7B pre-tr...

Pre-training and fine-tuning require different regularization strategies. During pre-training, the goal is stability and optimization; therefore, dropout is typically disabled, while weight decay, z-loss, and gradient clipping are used to manage the training dynamics. In contrast, fine-tuning on smaller datasets poses a higher risk of overfitting, necessitating the re-introduction of dropout in upper layers and the use of techniques like early stopping to prevent the model from memorizing the specific training set.

Code playground (Python)