MOSS icon indicating copy to clipboard operation
MOSS copied to clipboard

For debugging consider passing CUDA_LAUNCH_BLOCKING=1

Open licongguan opened this issue 2 years ago • 3 comments

Hi, great job!

I run the demo program on a single 4090 (24g) video memory, and it can be started, but when asking questions, it will report the following error:

欢迎使用 MOSS 人工智能助手!输入内容即可进行对话。输入 clear 以清空对话历史,输入 stop 以终止对话。 <|Human|>: 介绍自己 Traceback (most recent call last): File "/media/glc/jack/GPT/MOSS-main/moss_cli_demo.py", line 89, in main() File "/media/glc/jack/GPT/MOSS-main/moss_cli_demo.py", line 72, in main outputs = model.generate( File "/home/glc/anaconda3/envs/gpt/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context return func(*args, **kwargs) File "/home/glc/anaconda3/envs/gpt/lib/python3.8/site-packages/transformers/generation/utils.py", line 1358, in generate if pad_token_id is not None and torch.sum(inputs_tensor[:, -1] == pad_token_id) > 0: RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

licongguan avatar Apr 22 '23 10:04 licongguan

应该是cuda pytorch版本不匹配。

acbogeh avatar Apr 22 '23 10:04 acbogeh

是的,已经解决了,代码也能运行,但是对他进行提问,moss没有任何输出,就一直等着,不知道什么原因?

licongguan avatar Apr 22 '23 11:04 licongguan

升级pytorch2.0就好了,我一样的问题

zacario-li avatar Apr 23 '23 09:04 zacario-li