How to quantize image segmentation model

Hi. I have a model for image segmentation(.pth) file. Please explain how it could be quantized. I would like to generalize this to any model.