In order to generalize in generative ai model when fine-tuned them on niche domain refer to the following code snippet:
In the code snippet above Data Augmentation , Regularization , Dropout have been used . This approach allows model to learn from niche data while retaining original training knowledge.