MOSS icon indicating copy to clipboard operation
MOSS copied to clipboard

我也是一样的问题, CUDA Version: 11.8

Open Kywaldos opened this issue 1 year ago • 4 comments

          我也是一样的问题, CUDA Version: 11.8 

Ubuntu 22.04.2 LTS Detail Information:

Setting pad_token_idtoeos_token_id:106068 for open-end generation. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/hyp/anaconda3/envs/moss/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/hyp/anaconda3/envs/moss/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

Originally posted by @r4ehyp in https://github.com/OpenLMLab/MOSS/issues/109#issuecomment-1520233385

Kywaldos avatar Apr 25 '23 06:04 Kywaldos

CUDA设备上没有可用的内核image, 感觉有几种可能: GPU和CUDA版本不兼容:GPU支持安装的CUDA版本。GPU型号和CUDA版本需要兼容。 PyTorch的CUDA版本与系统CUDA版本不匹配:PyTorch与系统上的CUDA版本兼容。可以使用torch.version.cuda查看PyTorch的CUDA版本。 transformers库的版本问题:与PyTorch版本兼容的transformers库。 代码试图在不支持的设备上运行CUDA操作:代码中指定的设备(例如,torch.device("cuda:0"))与实际的GPU设备匹配。

zky001 avatar Apr 25 '23 06:04 zky001

应修改那块啊

lorentz-wu avatar Apr 25 '23 09:04 lorentz-wu

pip uninstall torch 卸载以前的torch,换了个torch版本重新按照。 下面是我的版本。 cuda:11.7 torch:2.0.0 A800服务器

wanghanbinpanda avatar Apr 25 '23 16:04 wanghanbinpanda

conda install cudatoolkit 自动安装cuda11.3运行时

yhyu13 avatar Apr 26 '23 14:04 yhyu13