During the training process, all calculations are performed on floating point, and the fake_quant module is used to model the quantization effect through clamping and rounding, simulating the effect of int8. They rely on a small set of carefully selected data, called a calibration data set, to determine the best quantitative parameters (such as scaling factors s and zero points z) for the model weights (and sometimes activation values).