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

显存不够 #514

Open
whwususu opened this issue May 27, 2024 · 11 comments
Open

显存不够 #514

whwususu opened this issue May 27, 2024 · 11 comments
Labels
question Further information is requested

Comments

@whwususu
Copy link

image
显卡是3090,报显存不够, 那么export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:设置为多少比较合适,改了几个数值,依旧报显存不够。谢谢!

@whwususu whwususu added the question Further information is requested label May 27, 2024
@guihonghao
Copy link
Contributor

你好,建议增加 --bits 4 参数进行量化

@whwususu
Copy link
Author

whwususu commented May 27, 2024

你好,建议增加 --bits 4 参数进行量化

在哪个文件更改啊,我现在没有进行微调,只是用这个模型去进行提取,就报了这个错误,谢谢!
image

@guihonghao
Copy link
Contributor

guihonghao commented May 27, 2024

你已经进行了4bits量化,建议减小输入长度 max_length=1024, max_new_tokens=512

@whwususu
Copy link
Author

你已经进行了4bits量化,建议减小输入长度 max_length=1024, max_new_tokens=512

已经启动起来了,感谢!
image
image
image
怎么抽也只能抽取到第一条,是我问的方式不对吗?
image

@guihonghao
Copy link
Contributor

我们训练集中文本长度偏短,因此建议实际使用中不要使用过长的文本进行抽取。

@whwususu
Copy link
Author

我们训练集中文本长度偏短,因此建议实际使用中不要使用过长的文本进行抽取。

没办法啊,都是一篇一篇文档过来。我是做了下测试。后面如果真的需要用,那可能真的需要学习了。

@zxlzr
Copy link
Contributor

zxlzr commented May 28, 2024

您可以暂时对文档进行划窗口来进行抽取,跑多次抽取模型

@whwususu
Copy link
Author

您可以暂时对文档进行划窗口来进行抽取,跑多次抽取模型

那上下文变化,准确度应该会下降。然后能不能直接读pdf之类,我现在是通过程序读取的pdf,转为了string

@guihonghao
Copy link
Contributor

当前阶段的模型可能还无法很好的处理文档级的抽取,我们将在下一个版本的模型中加强这方面的能力。

@whwususu
Copy link
Author

当前阶段的模型可能还无法很好的处理文档级的抽取,我们将在下一个版本的模型中加强这方面的能力。

期待中

@gangqing
Copy link

gangqing commented Jun 4, 2024

@whwususu 请问你是怎么解决的?我也是报这个错,减小了输入输出长度也还是报错。

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

No branches or pull requests

4 participants