IST-DASLab / gptq

Code for the ICLR 2023 paper "GPTQ: Accurate Post-training Quantization of Generative Pretrained Transformers".
https://arxiv.org/abs/2210.17323
Apache License 2.0
1.81k stars 145 forks source link

Update gptq.py #42

Open zzz0906 opened 11 months ago

zzz0906 commented 11 months ago

In calculation, it seems you use percentage to do the calculation. Thus, when new input comes, the tmp seems to be the number of input, the percentage shall be tmp/nsamples and then *2. It seems you defaultly set tmp = 1 in the code.