Samsung / ONE

On-device Neural Engine
Other
435 stars 157 forks source link

[circle-quantizer] Support GPTQ #13480

Open 01000-you opened 3 months ago

01000-you commented 3 months ago

What

Why

How

Method

Overview _gptq

01000-you commented 2 months ago

Experimental results

  Size     Accuracy        
  NumParams FP32 size INT4 size Baseline PTQ-W8 GPTQ-W8 PTQ-W4 GPTQ-W4
DeiT 5,000,000 19.07MB 4.77MB 0.7202 0.7201 0.7202 0.6466 0.6918
EfficientFormer 12,290,000 46.88MB 11.72MB 0.8018 0.8002 0.8017 0.2023 0.77
ResNet18 11,689,512 44.59MB 11.15MB 0.6976 0.6974 0.6973 0.5821 0.6879
ResNet50 25,557,032 97.49MB 24.37MB 0.7615 0.7607 0.7611 0.5821 0.7557
RegNet400mf 4,344,144 16.57MB 4.14MB 0.7403 0.7395 0.7404 0.3613 0.7194
ResNeXt50 25,028,904 95.48MB 23.87MB 0.7761 0.7758 0.7763 0.6559 0.7686
Wide ResNet50 68,883,240 262.77MB 65.69MB 0.7848 0.7849 0.7847 0.7114 0.7801
Vgg16 138,357,544 527.79MB 131.95MB 0.7159 0.7156 0.7158 0.4644 0.6992
SqueezeNet 1,248,424 4.76MB 1.19MB 0.581 0.5796 0.5803 0.3335 0.5609
ShuffleNet_x0_5 1,366,792 5.21MB 1.30MB 0.6055 0.6021 0.6043 0.1033 0.3634
jinevening commented 2 months ago

The result in https://github.com/Samsung/ONE/issues/13480#issuecomment-2270215801 shows that GPTQ is effective in 4 bit weight quantization. For 8bits, the current PTQ works well for all benchmark models.

Do you have a plan to support 4 bit weight quantization?