Posts

Showing posts with the label pre-training

Understanding NLP Model Adaptation: Pre-Training vs. Fine-Tuning

Image
The difference is a mere difference in the terminology used. When the model is trained on a large generic corpus, it is called 'pre-training'. When it is adapted to a particular task or dataset it is called 'fine-tuning'. Technically speaking, in either case ('pre-training or 'fine-tuning'), there are updates to the model weights. For example, usually, you can just take the pre-trained model and then fine-tune it for a specific task (such as classification, question-answering, etc.). However, if you find that the target dataset is from a specific domain, and you have a few unlabeled data that might help the model to adapt to the particular domain, then you can do an MLM or MLM+NSP 'fine-tuning' (unsupervised learning) (some researchers do call this as 'pre-training' especially when a huge corpus is used to train the model), followed by using the target corpus with target task fine-tuning.

Pre-Training vs. Fine Tuning: Understanding the Difference

Image
Pre-training Fine tuning PEFT Adapter Tuning LoRA Quantization Prompt Modifications Hard Prompt Soft Prompt Prompt Tuning Prefix Tuning P-tuning Pre-training Pre-training is when you have the entire architecture of neural net model in front of you and you train it on a huge dataset from scratch. We can also call it self-supervised training because there are no separate labels assigned to the text data. We can use this unlabeled data for training by simply thinking of it as a next word prediction task where the next word is already made available to us. The large language models are generally pre-trained on variety of tasks involving creative writing, writing emails, text summarization among others. Fine tuning We can think of fine tuning as a process in which we freeze the parameters of all except the last few layers of the pre-trained model. Then, we train the parameters of the last layers on a downstream task such as sentiment analysis or classification using a labeled dataset wh...