Skip to content

Add auto-gptq integration#175

Draft
PanQiWei wants to merge 16 commits into
OpenMOSS:mainfrom
PanQiWei:main
Draft

Add auto-gptq integration#175
PanQiWei wants to merge 16 commits into
OpenMOSS:mainfrom
PanQiWei:main

Conversation

@PanQiWei

@PanQiWei PanQiWei commented Apr 26, 2023

Copy link
Copy Markdown

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
Copy Markdown
Author

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

@Hzfinfdu

Copy link
Copy Markdown
Member

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

@yhyu13

yhyu13 commented Apr 27, 2023

Copy link
Copy Markdown

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

@PanQiWei

PanQiWei commented Apr 27, 2023

Copy link
Copy Markdown
Author

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

@PanQiWei

Copy link
Copy Markdown
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 Apr 29, 2023
@PanQiWei

PanQiWei commented Apr 29, 2023

Copy link
Copy Markdown
Author

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

@wml1993

wml1993 commented May 6, 2023

Copy link
Copy Markdown

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

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

PanQiWei commented May 6, 2023

Copy link
Copy Markdown
Author

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants