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

调用glm模型,遇到modeling_glm.py的bug:attention_mask初始化device设置遗漏 #186

Open
luo-li-ba-suo opened this issue Jul 13, 2023 · 1 comment

Comments

@luo-li-ba-suo
Copy link

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper_CUDA__index_select)

原因是GLMModel类中
if attention_mask is None: attention_mask = torch.zeros(batch_size)
这里没有把attention_mask转到正确的device上

@luo-li-ba-suo
Copy link
Author

额 貌似是别的问题
这个问题不管好像没事

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

No branches or pull requests

1 participant