How to load only a part of pretrained weights?

For example, I am using T5ModelForConditionalGeneration. I want the decoder part loads pretrained weights, but the encoder part is left randomly initialized.