akankshakshurai/cuda-error-resolution-analysis huggingface dataset:
Can I save my own pretrained models and fine tune them later?

c_t: <p>Hello,<br>
I have a question regarding the save/load procedures described here:<br>
<a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html" class="onebox" target="_blank" rel="nofollow noopener">https://pytorch.org/tutorials/beginner/saving_loading_models.html</a></p>
<p>I want to know if i am able to:<br>
-Train a model on some data (lots of general domain data like movie reviews, product reviews, etc,  that are associated with positive/negative classes)<br>
-Save it<br>
-Load the pre-trained model<br>
-Train again with less data ( but task-specific like hate speech where the classes might be offensive/not-offensive ) and fine tune it by using a lower learning rate and try other techniques.</p>
<p>So, after I load my pre-trained model, can I start training again and modify it?  With the procedures described in the link i mentioned above.</p>
<p>Thank you very much!</p>

ptrblck: <p>Yes, that would be a classic fine-tuning task and is possible in PyTorch.<br>
As described in the docs you’ve posted, you might also need to save and load the optimizer’s <code>state_dict</code>, if your optimizer has internal states (e.g. Adam uses running estimates).</p>
<p>The <a href="https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html" rel="nofollow noopener">Finetuning tutorial</a> explains how to load pre-trained <code>torchvision</code> models and fine-tune them. Instead of loading the <code>torchvision</code> model, you might just want to load your custom model and adapt the code appropriately.</p>