src/transformers/models/whisper/modeling_whisper.py/WhisperForConditionalGeneration/freeze_encoder
class WhisperForConditionalGeneration:    def freeze_encoder(self):
        """
        Calling this function will disable the gradient computation for the Whisper encoder so that its parameters will
        not be updated during training.
        """
        self.model.encoder._freeze_parameters()