Dec 9, 2020
Thank you Vignesh for your interest in my article! All pytorch transformers model from HuggingFace library are built just like any pytorch model. In order to freeze any layer you can use same code as you would to freeze layers in any pytorch model.
Here is a link to get started: https://discuss.pytorch.org/t/how-the-pytorch-freeze-network-in-some-layers-only-the-rest-of-the-training/7088