Open shazib-summar opened 4 years ago
Hi,
As per my understanding, the model's parameters after being retrained is still in FP32. They are not quantized into Int8 yet. In case you want to examine the accuracy improvement of the retrained model, you should invoke the PTQ on that model. The bash command is the same for the PTQ with a small modification of the path to your checkpoint.pth.tar (--resume-from path/to/your/checkpoint).
I hope it helps. BR
But what about @guyjacob comment in which he says that the weights will be quantized after QAT?
Hi, I'm working on applying QAT on a model. I made the necessary modifications. However, when I looked into one of the saved checkpoint
.pth
files, I observed that none of the weights were actually quantized. All<layer_name>.weight
tensor were in floating point format. Following this, I ran the QAT example provided here. I made the same observations. None of the tensors in the saved.pth
files were quantized. The command I ran is,An excerpt from the state_dict is below
What am I doing wrong? Because @guyjacob mentioned in this comment that
I observed the discretized tensor during PTQ. The tensor were of dtype FP32, however they contained integer values. I hoped QAT would also behave similarly.
Please help me out here. Thanks for any help in advance.