GLM
GLM copied to clipboard
调用glm模型,遇到modeling_glm.py的bug:attention_mask初始化device设置遗漏
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上