-
Notifications
You must be signed in to change notification settings - Fork 326
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
pytorch GPT模型显存OOM,cuda11不能运行 #17
Comments
@bigprince97 感谢你使用lightseq并成功应用在自己的模型上面。回答一下你提出的两个问题: 1.vocab设置过大显存会爆。 2.3090使用lightseq。 |
您指的max_step应该是位置向量的最大长度吧,这改成100,的确能扩大vocab size到50257,感谢 ! |
另外我将pytorch版本的gpt2的参数根据proto转换成了对应的模型文件,lightseq可以正常推理,但是预测结果和pytorch版本的gpt2有很大差异,pytorch版本是按照gpt2论文的结构,可能和lightseq里面的gpt模型结构有细微差异,这一块具体的模型结构,能够麻烦提供具体的pytorch或者tf版本的实现吗? |
结果不一致的问题已经解决了,不是模型结构不一致的问题,是pytorch的参数矩阵转置问题。 |
很高兴看到你的问题得到解决,剩下一个是3090上的运行。这个问题的主要原因在于build所依赖的Nvidia Triton inference server镜像不支持3090。 我们前几天更新了CMake的编译方法,解决了对Triton inference server镜像的依赖,欢迎你尝试一下doc/build.md里提到的方法进行编译,应该可以解决在3090或者说是cuda11下的运行问题。 |
项目里有submodule,尝试 |
@bigprince97 您好,我也遇到了lightseq预测结果和pytorch版本的gpt2(https://github.com/yangjianxin1/GPT2-chitchat) |
@Majokiki pytorch的weight很多都是[out_dim, in_dim]的方式存储的,lightseq中需要[in_dim, out_dim]的方式存储 |
您好,我也遇到了pytorch和lightseq的gpt2不一致的问题,请问具体是怎么解决的呢?在pytorch模型转化之前做什么吗? |
感谢你们的开源工作,我用自己的模型转化之后可以成功用lightseq成功预测,加速效果的确明显,但是vocab size只能为非常小的值,一旦过大,就会爆显存,实例模型的vocab size是5004,有相应解决方案吗?在3090上也不能用Lightseq,有支持3090的打算吗?
The text was updated successfully, but these errors were encountered: