Fine-tuning my Pegasus financial sentiment model

So I came across this code for fine-tuning a summarization model for sentiment analysis with BERT transformer. Keeping this as a base reference, I am trying to do a financial summarization for my model using Pegasus transformer.

But this is the part where I got stuck. The tutorial makes a class here with freeze_bert = False for freezing layers during training.

class BertClassifier(nn.Module):
    def __init__(self, freeze_bert=False):
        ##bert: a BertModel object
        ##classifier: a torch.nn.Module classifier
        ##freeze_bert (bool): Set `False` to fine-tune the BERT model
        super(BertClassifier, self).__init__()

This is the page I am referring to -

Now that I am using a Pegasus transformer, what could be an equivalent to the freeze_bert parameter? The transformer is not custom-made or something, so the HuggingFace documentation shouldnt apply I guess(?). Idk.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum