Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto-gptq integration #175

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Add auto-gptq integration #175

wants to merge 16 commits into from

Conversation

PanQiWei
Copy link

@PanQiWei PanQiWei commented Apr 26, 2023

using auto-gptq to simplify code and quantization, by this, user can use quantized model to inference with or without triton installed, and can even run on CPU.

@xiami2019 xiami2019 requested a review from Hzfinfdu April 26, 2023 11:29
@PanQiWei
Copy link
Author

国内镜像源可能暂时还没有同步到 auto-gptq,安装依赖时需要指定官方源 -i https://pypi.org/simple

@Hzfinfdu
Copy link
Member

感谢您的PR. 看了一下autogptq的安装,默认会重装torch和cuda ext。这对于多数用户来说感觉不够友好,能否为MOSS设计一个pip install 的最小依赖集合,可以在现有的环境上便捷地安装?

@yhyu13
Copy link

yhyu13 commented Apr 27, 2023

@PanQiWei 装了auto-gptq,是不是量化就不用自己配置cuda环境,然后从gptq源码编译whl和pytorch extension?auto-gptq有要求对应的pytorch cuda版本?或transformer版本

@PanQiWei
Copy link
Author

PanQiWei commented Apr 27, 2023

@Hzfinfdu 我对 setup_env.py 脚本做了更新,添加了四个选项 --reinstall_torch, --install_auto_gptq, --no_cuda_ext_for_auto_gptq--install_triton, 可以让用户更灵活地配置环境

@PanQiWei
Copy link
Author

@PanQiWei 装了auto-gptq,是不是量化就不用自己配置cuda环境,然后从gptq源码编译whl和pytorch extension?auto-gptq有要求对应的pytorch cuda版本?或transformer版本

@yhyu13 是的,pytorch 最低要求 1.13.0, transformers 是最低要求 4.26.1

@PanQiWei PanQiWei changed the title Add auto-gptq integration [WIP] Add auto-gptq integration Apr 29, 2023
@PanQiWei
Copy link
Author

PanQiWei commented Apr 29, 2023

新增使用 auto-gptq 和 SFT 数据在本地执行模型量化的脚本,注意如需使用该脚本,需要从 AutoGPTQ 项目主分支拉取最新源码安装 auto-gptq

@wml1993
Copy link

wml1993 commented May 6, 2023

代码还没有合并到主repo上是因为有问题吗?

@PanQiWei PanQiWei marked this pull request as draft May 6, 2023 08:20
@PanQiWei PanQiWei changed the title [WIP] Add auto-gptq integration Add auto-gptq integration May 6, 2023
@PanQiWei
Copy link
Author

PanQiWei commented May 6, 2023

代码还没有合并到主repo上是因为有问题吗?

我还没进行完整的应用测试,包括 auto-gptq 发布了新的版本,兼容问题也需要测测,我争取周末做一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants