lmdeploy icon indicating copy to clipboard operation
lmdeploy copied to clipboard

[Bug] group size=64的awq量化精度损失明显

Open bisunny opened this issue 1 year ago • 3 comments

Checklist

  • [ ] 1. I have searched related issues but cannot get the expected help.
  • [ ] 2. The bug has not been fixed in the latest version.

Describe the bug

通过修改源码gemm_s4_f16.cu中的硬编码 ' /// TODO: add more group sizes Generate<128, Ops>(kernels_); group_sizes_.push_back(128);' 为 ‘ /// TODO: add more group sizes Generate<64, Ops>(kernels_); group_sizes_.push_back(64);’ 并使用group size=64进行量化。发现模型的精度内眼可见的差。 请问除了修改这些,我还需要做些什么来适配group size为64的awq量化呢

Reproduction

‘ /// TODO: add more group sizes Generate<64, Ops>(kernels_); group_sizes_.push_back(64);’

Environment

lmdeploy v0.1.0

Error traceback

No response

bisunny avatar Mar 18 '24 15:03 bisunny

1.0版本有的inline ptx忘了加volatile,导致某些case的结果不正确。

可以试试turbomind-2.1分支。

lzhangzz avatar Mar 18 '24 18:03 lzhangzz

非常感谢,我将按照您的建议尝试下

bisunny avatar Mar 19 '24 01:03 bisunny

我使用了turbomind-2.1分支,并按照同样的方法修改了group size,但是精度问题依然存在。麻烦再次帮忙确认下这个问题

bisunny avatar Mar 19 '24 12:03 bisunny