Kai123:

Thank you for your time Jerry…I want to perform quantize aware training for a cnn model to lower bit precision than int8. I want to know the exact procedure. I found some articles on the internet. But they are mostly telling about how to calculate the scale, zero point and how to quantize and dequantize…I want to know how perform quantization aware training…


If you just need to do QAT then you can try setting quant_min, quant_max in FakeQuantize module I think
you can find the way we configure FakeQuantize here: pytorch/qconfig.py at master · pytorch/pytorch · GitHub 2, we just need to configure FakeQuantize with quant_min, quant_max for 4 bit, e.g. -8, 7 and then define the qconfig based on that.