Questions for PTQ Entropy Calibration

I have three question on “Entropy Calibration - pseudocode”

  1. Why should we preserve empty bins after squeeze-expand process on Entropy Calibration[PTQ]? It seems reasonable to preserve empty bins but It will loss some righteousness for simulating quantization with Histogram.

  2. How to deal with empty bins to calculate KLDivs?
    I’ve deal those zero with epsilon[1e-6]. is it right way?

Thank you for kind answer

Hi, Please refer to the below links to perform inference in INT8